1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

Revert "return WM_NULL if there are no filters"

This reverts commit e4eafef6526426f99c185b0d138fc8f031a8426c.
This commit is contained in:
FunkyFr3sh 2024-09-10 15:40:05 +02:00
parent d2db12f2af
commit 691b5196d5

View File

@ -598,7 +598,7 @@ HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, D
return result;
}
void HandleMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg)
void HandleMessage(LPMSG lpMsg, HWND hWnd)
{
if (lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
{
@ -638,13 +638,7 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMa
mouse_lock();
if (!wMsgFilterMin &&
!wMsgFilterMax &&
!(wRemoveMsg & (PM_QS_INPUT | PM_QS_PAINT | PM_QS_POSTMESSAGE | PM_QS_SENDMESSAGE)))
{
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
}
//lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
break;
}
@ -667,13 +661,7 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMa
if (!g_config.devmode && !g_mouse_locked)
{
// Does not work with 'New Robinson'
if (!wMsgFilterMin &&
!wMsgFilterMax &&
!(wRemoveMsg & (PM_QS_INPUT | PM_QS_PAINT | PM_QS_POSTMESSAGE | PM_QS_SENDMESSAGE)))
{
lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
}
//lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
break;
}
@ -693,7 +681,7 @@ BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wM
BOOL result = real_GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
if (result)
{
HandleMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, 0);
HandleMessage(lpMsg, hWnd);
}
return result;
@ -707,7 +695,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, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
HandleMessage(lpMsg, hWnd);
}
return result;