1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-06 21:26:56 +02:00

MinGW support

This commit is contained in:
XProger
2021-03-28 12:54:40 +03:00
parent 80bf5322a1
commit a4eac0afa1
2 changed files with 7 additions and 0 deletions

View File

@@ -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

View File

@@ -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);