From 7bd8de8dbddecbdaefbc79e3c2a48d404243c602 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 10 Mar 2013 20:28:01 -0400 Subject: [PATCH] don't immediately exit if we leave the menu by means other than the menu button --- frontend/menu/rgui.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 23eb2a0102..5166e3e9ff 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -1615,7 +1615,7 @@ void menu_free(void) rgui_free(rgui); } -static uint16_t trigger_state = 0; +static uint16_t trigger_state; static int menu_input_process(void *data, void *state) { @@ -1647,7 +1647,7 @@ static int menu_input_process(void *data, void *state) bool menu_iterate(void) { - static uint16_t old_input_state = 0; + static uint16_t old_input_state = (1ULL << GX_DEVICE_NAV_MENU); static bool initial_held = true; static bool first_held = false; bool do_held; @@ -1788,6 +1788,9 @@ bool menu_iterate(void) return true; deinit: + // so we don't immediately exit when we re-open the menu + old_input_state |= (1ULL << GX_DEVICE_NAV_MENU); + g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_DRAW); g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_INGAME);