Skip to content

Commit

Permalink
Fixed build on MinGW with GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Aug 30, 2017
1 parent 1fec9eb commit 886f3a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.lib
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ make_cflags_and_ldflags() {
# And others like Windows
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
CFLAGS="$CFLAGS -DWIN"
LIBS="$LIBS -lShlwapi"
fi

if [ "$os" = "TOS" ]; then
Expand Down
4 changes: 4 additions & 0 deletions src/os/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#define unlink _unlink
#include <ShlObj.h>
#include <Shlwapi.h>
#elif defined(_WIN32)
#include <io.h>
#include <ShlObj.h>
#include <Shlwapi.h>
#else /* _MSC_VER */
#include <unistd.h>
#endif /* _MSC_VER */
Expand Down
2 changes: 1 addition & 1 deletion src/video/video_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
}

scan = MapKey(wParam);
// Real scancode is also ((lParam >> 16) & 0xff)
/* Real scancode is also ((lParam >> 16) & 0xff) */

if (scan == 0) {
Warning("Unhandled key %X (='%c') (scan = %x)\n", wParam, wParam >= 32 ? wParam : '.', (lParam >> 16) & 0xff);
Expand Down

0 comments on commit 886f3a8

Please sign in to comment.