mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Windows: resync num/caps lock when window is gaining focus.
This commit is contained in:
parent
257b7af247
commit
fd6b435c6a
@ -415,6 +415,9 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
* FIXME: Update keyboard state
|
* FIXME: Update keyboard state
|
||||||
*/
|
*/
|
||||||
WIN_CheckClipboardUpdate(data->videodata);
|
WIN_CheckClipboardUpdate(data->videodata);
|
||||||
|
|
||||||
|
SDL_ToggleModState(KMOD_CAPS, (GetKeyState(VK_CAPITAL) & 0x0001) != 0);
|
||||||
|
SDL_ToggleModState(KMOD_NUM, (GetKeyState(VK_NUMLOCK) & 0x0001) != 0);
|
||||||
} else {
|
} else {
|
||||||
if (SDL_GetKeyboardFocus() == data->window) {
|
if (SDL_GetKeyboardFocus() == data->window) {
|
||||||
SDL_SetKeyboardFocus(NULL);
|
SDL_SetKeyboardFocus(NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user