Commit 1466aa84 authored by chili's avatar chili
Browse files

clear keystate on focus loss

parent 5f700ed8
......@@ -137,6 +137,10 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
case WM_CLOSE:
PostQuitMessage( 0 );
return 0;
// clear keystate when window loses focus to prevent input getting "stuck"
case WM_KILLFOCUS:
kbd.ClearState();
break;
/*********** KEYBOARD MESSAGES ***********/
case WM_KEYDOWN:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment