diff --git a/src/platform/win/compile_mingw.bat b/src/platform/win/compile_mingw.bat new file mode 100644 index 0000000..8a28fca --- /dev/null +++ b/src/platform/win/compile_mingw.bat @@ -0,0 +1 @@ +C:\MinGW\bin\mingw32-g++ -std=c++11 -O3 -s -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DWIN32 -DNDEBUG -DNO_TOUCH_SUPPORT -I../../libs/ main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c -I../../ -o../../../bin/OpenLara_mingw.exe -lopengl32 -lwinmm -lwsock32 -lgdi32 -lm \ No newline at end of file diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp index b9265e9..1d98c6f 100644 --- a/src/platform/win/main.cpp +++ b/src/platform/win/main.cpp @@ -264,6 +264,7 @@ void joyUpdate() { } } +#ifndef NO_TOUCH_SUPPORT // touch BOOL (WINAPI *_RegisterTouchWindow)(HWND, ULONG); BOOL (WINAPI *_GetTouchInputInfo)(HTOUCHINPUT, UINT, PTOUCHINPUT, int); @@ -306,6 +307,9 @@ void touchUpdate(HWND hWnd, HTOUCHINPUT hTouch, int count) { _CloseTouchInputHandle(hTouch); } +#else +void touchInit(HWND hWnd) {}; +#endif // sound #define SND_SIZE (2352*3*2) @@ -732,10 +736,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara joyFree(); joyInit(); return 1; + #ifndef NO_TOUCH_SUPPORT // touch case WM_TOUCH : touchUpdate(hWnd, (HTOUCHINPUT)lParam, wParam); break; + #endif // sound case MM_WOM_DONE : sndFill((HWAVEOUT)wParam, (WAVEHDR*)lParam);