mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +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;
|
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)
|
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)
|
if (lpMsg->hwnd != g_ddraw.hwnd)
|
||||||
return;
|
return TRUE;
|
||||||
|
|
||||||
switch (LOWORD(lpMsg->message))
|
switch (LOWORD(lpMsg->message))
|
||||||
{
|
{
|
||||||
@ -653,6 +653,7 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
|||||||
mouse_lock();
|
mouse_lock();
|
||||||
|
|
||||||
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -675,12 +676,15 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
|||||||
{
|
{
|
||||||
// Does not work with 'New Robinson'
|
// Does not work with 'New Robinson'
|
||||||
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax)
|
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);
|
BOOL result = real_PeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
HandleMessage(lpMsg, hWnd);
|
return HandleMessage(lpMsg, hWnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user