From a42bdae84d2129a0d91eaa225b3e2b46f419b392 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Mon, 9 Sep 2024 15:31:18 +0200 Subject: [PATCH] do not return WM_NULL for now (needs more testing) --- src/winapi_hooks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index f931f96..1083f4a 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -614,7 +614,7 @@ HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, D void HandleMessage(LPMSG lpMsg, HWND hWnd) { - if (lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width && !g_config.fixmousehook) + if (lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width) { if (!g_config.windowed || real_ScreenToClient(g_ddraw.hwnd, &lpMsg->pt)) { @@ -652,7 +652,8 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd) mouse_lock(); - lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message)); + //lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message)); + break; } break; @@ -674,13 +675,12 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd) if (!g_config.devmode && !g_mouse_locked) { // Does not work with 'New Robinson' - lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message)); + //lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message)); break; } InterlockedExchange((LONG*)&g_ddraw.cursor.x, GET_X_LPARAM(lpMsg->lParam)); InterlockedExchange((LONG*)&g_ddraw.cursor.y, GET_Y_LPARAM(lpMsg->lParam)); - break; } }