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

check context code and previous key state on WM_SYSKEYDOWN

This commit is contained in:
FunkyFr3sh 2019-11-15 07:46:46 +01:00
parent a50ab60c89
commit c6ad63e837

View File

@ -1474,7 +1474,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
case WM_SYSKEYDOWN:
{
if (wParam == VK_RETURN)
BOOL contextCode = (lParam & (1 << 29)) != 0;
BOOL keyState = (lParam & (1 << 30)) != 0;
if (wParam == VK_RETURN && contextCode && !keyState)
{
ToggleFullscreen();
return 0;