Rewrite menu toggle check
This commit is contained in:
parent
d08b785f9d
commit
759b963c2f
11
retroarch.c
11
retroarch.c
|
@ -2402,6 +2402,12 @@ static enum runloop_state runloop_check_state(
|
|||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
/* Check menu toggle */
|
||||
{
|
||||
static bool old_pressed = false;
|
||||
bool pressed = runloop_cmd_press(
|
||||
current_input, RARCH_MENU_TOGGLE);
|
||||
|
||||
if (menu_event_kb_is_set(RETROK_F1) == 1)
|
||||
{
|
||||
if (menu_driver_is_alive())
|
||||
|
@ -2414,7 +2420,7 @@ static enum runloop_state runloop_check_state(
|
|||
}
|
||||
}
|
||||
else if ((!menu_event_kb_is_set(RETROK_F1) &&
|
||||
runloop_cmd_triggered(trigger_input, RARCH_MENU_TOGGLE)) ||
|
||||
(pressed && !old_pressed)) ||
|
||||
(current_core_type == CORE_TYPE_DUMMY))
|
||||
{
|
||||
if (menu_driver_is_alive())
|
||||
|
@ -2431,6 +2437,9 @@ static enum runloop_state runloop_check_state(
|
|||
else
|
||||
menu_event_kb_set(false, RETROK_F1);
|
||||
|
||||
old_pressed = pressed;
|
||||
}
|
||||
|
||||
if (menu_driver_is_alive())
|
||||
{
|
||||
if (!settings->bools.menu_throttle_framerate && !settings->floats.fastforward_ratio)
|
||||
|
|
Loading…
Reference in New Issue