From a063e2582510a18cb8f83f1bb52d94f28574c7b6 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 6 Sep 2024 16:34:52 +0200 Subject: [PATCH] fix last_msg_pull_tick update --- src/winapi_hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index 23cd25e..6768a9b 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -710,7 +710,7 @@ BOOL HandleMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMa BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax) { - if (g_ddraw.ref && hWnd == g_ddraw.hwnd) + if (g_ddraw.ref && (!hWnd || hWnd == g_ddraw.hwnd)) g_ddraw.last_msg_pull_tick = timeGetTime(); BOOL result = real_GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); @@ -748,7 +748,7 @@ BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wM BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg) { - if (g_ddraw.ref && hWnd == g_ddraw.hwnd) + if (g_ddraw.ref && (!hWnd || hWnd == g_ddraw.hwnd)) g_ddraw.last_msg_pull_tick = timeGetTime(); BOOL result = real_PeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);