fix mouse capture hotkey not working

There's a normal binding for this set in your configs/`grab_mouse_toggle`, but
there's a second place where it's hardcoded to check the F11 key. Because F11
is the default key, both of these codepaths will run which immediately captures
and then uncaptures the mouse cursor, effectively breaking it.

Tested and this fixes the behavior on Linux and Emscripten
This commit is contained in:
Toad King 2020-01-18 12:44:57 -06:00
parent 142503d3b5
commit 7ca666a0e9

View File

@ -14983,12 +14983,6 @@ static unsigned menu_event(
ret = MENU_ACTION_TOGGLE;
}
if (menu_keyboard_key_state[RETROK_F11])
{
command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL);
menu_keyboard_key_state[RETROK_F11] = 0;
}
/* Get pointer (mouse + touchscreen) input */
/* > If pointer input is disabled, do nothing */