mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
Revert "never return FALSE from peekmessage to avoid issues"
This reverts commit 89d38454733b115f743c98a94922bb5f2527830f.
This commit is contained in:
parent
801d31f68e
commit
7de3efd050
@ -612,7 +612,7 @@ HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, D
|
||||
return result;
|
||||
}
|
||||
|
||||
void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
||||
BOOL HandleMessage(LPMSG lpMsg, HWND hWnd)
|
||||
{
|
||||
if (lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width && !g_config.fixmousehook)
|
||||
{
|
||||
@ -637,7 +637,7 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
||||
}
|
||||
|
||||
if (lpMsg->hwnd != g_ddraw.hwnd)
|
||||
return;
|
||||
return TRUE;
|
||||
|
||||
switch (LOWORD(lpMsg->message))
|
||||
{
|
||||
@ -653,6 +653,7 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
||||
mouse_lock();
|
||||
|
||||
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -675,12 +676,15 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
||||
{
|
||||
// Does not work with 'New Robinson'
|
||||
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax)
|
||||
@ -705,7 +709,7 @@ BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT w
|
||||
BOOL result = real_PeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
||||
if (result)
|
||||
{
|
||||
HandleMessage(lpMsg, hWnd);
|
||||
return HandleMessage(lpMsg, hWnd);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user