mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
return WM_NULL if there are no filters
This commit is contained in:
parent
df91a4308f
commit
e4eafef652
@ -598,7 +598,7 @@ HHOOK WINAPI fake_SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, D
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
void HandleMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg)
|
||||||
{
|
{
|
||||||
if (lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
|
if (lpMsg && g_ddraw.ref && g_ddraw.hwnd && g_ddraw.width)
|
||||||
{
|
{
|
||||||
@ -638,7 +638,13 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
|||||||
|
|
||||||
mouse_lock();
|
mouse_lock();
|
||||||
|
|
||||||
//lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -661,7 +667,13 @@ void HandleMessage(LPMSG lpMsg, HWND hWnd)
|
|||||||
if (!g_config.devmode && !g_mouse_locked)
|
if (!g_config.devmode && !g_mouse_locked)
|
||||||
{
|
{
|
||||||
// Does not work with 'New Robinson'
|
// Does not work with 'New Robinson'
|
||||||
//lpMsg->message = (UINT)MAKELONG(WM_NULL, HIWORD(lpMsg->message));
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -681,7 +693,7 @@ BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wM
|
|||||||
BOOL result = real_GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
|
BOOL result = real_GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
HandleMessage(lpMsg, hWnd);
|
HandleMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -695,7 +707,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);
|
HandleMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user