Fix grab mouse toggle

This commit is contained in:
twinaphex 2016-10-28 06:41:53 +02:00
parent 320c49e08e
commit 94a67444be

View File

@ -217,7 +217,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
for (i = 0; i < RETROK_LAST; i++) for (i = 0; i < RETROK_LAST; i++)
{ {
if (i == RETROK_F1) if (i == RETROK_F1 || i == RETROK_F11)
continue; continue;
if (menu_keyboard_key_state[i]) if (menu_keyboard_key_state[i])
@ -230,9 +230,6 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
case RETROK_f: case RETROK_f:
BIT32_SET(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY); BIT32_SET(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY);
break; break;
case RETROK_F11:
BIT32_SET(trigger_input, RARCH_GRAB_MOUSE_TOGGLE);
break;
case RETROK_PAGEUP: case RETROK_PAGEUP:
BIT32_SET(trigger_input, settings->menu_scroll_up_btn); BIT32_SET(trigger_input, settings->menu_scroll_up_btn);
break; break;
@ -299,8 +296,11 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY)) if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY))
command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL);
if (runloop_cmd_triggered(trigger_input, RARCH_GRAB_MOUSE_TOGGLE)) if (menu_keyboard_key_state[RETROK_F11])
{
command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL); command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL);
menu_keyboard_key_state[RETROK_F11] = false;
}
if (runloop_cmd_press(trigger_input, RARCH_QUIT_KEY)) if (runloop_cmd_press(trigger_input, RARCH_QUIT_KEY))
{ {