* Improve mouse grabbing.

This fixes a bug where the mouse would be restricted to the window after the level is loaded even if the window isn't focused.
This commit is contained in:
iProgramInCpp
2023-08-01 11:08:56 +03:00
parent 67d1fc4f44
commit af11c5281c
6 changed files with 30 additions and 2 deletions

View File

@@ -77,6 +77,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
default:
return DefWindowProc(hWnd, iMsg, wParam, lParam);
case WM_SETFOCUS:
case WM_KILLFOCUS:
{
g_AppPlatform.updateFocused(iMsg == WM_SETFOCUS);
break;
}
case WM_LBUTTONUP:
{
if (g_LButtonDown)