Revert "never return FALSE from peekmessage to avoid issues"
This reverts commit 89d3845473
.
This commit is contained in:
parent
801d31f68e
commit
7de3efd050
1 changed files with 7 additions and 3 deletions
|
@ -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…
Reference in a new issue