mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(WinRaw) Clear key states when unfocused (#14080)
This commit is contained in:
parent
fae8d7e38f
commit
1ad9b20b09
@ -643,7 +643,7 @@ static void winraw_poll(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent LAlt sticky after unfocusing with Alt-Tab */
|
/* Prevent LAlt sticky after unfocusing with Alt-Tab */
|
||||||
if ( !winraw_focus
|
if ( !winraw_focus
|
||||||
&& wr->keyboard.keys[SC_LALT]
|
&& wr->keyboard.keys[SC_LALT]
|
||||||
&& !(GetKeyState(VK_MENU) & 0x8000))
|
&& !(GetKeyState(VK_MENU) & 0x8000))
|
||||||
{
|
{
|
||||||
@ -652,6 +652,9 @@ static void winraw_poll(void *data)
|
|||||||
input_keymaps_translate_keysym_to_rk(SC_LALT),
|
input_keymaps_translate_keysym_to_rk(SC_LALT),
|
||||||
0, 0, RETRO_DEVICE_KEYBOARD);
|
0, 0, RETRO_DEVICE_KEYBOARD);
|
||||||
}
|
}
|
||||||
|
/* Clear all keyboard key states when unfocused */
|
||||||
|
else if (!winraw_focus && !(GetKeyState(VK_MENU) & 0x8000))
|
||||||
|
memset(wr->keyboard.keys, 0, SC_LAST);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned winraw_retro_id_to_rarch(unsigned id)
|
static unsigned winraw_retro_id_to_rarch(unsigned id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user