@@ -5438,7 +5438,7 @@ static enum runloop_state_enum runloop_check_state(
54385438 menu_handle_t * menu = menu_st -> driver_data ;
54395439 unsigned menu_toggle_gamepad_combo = settings -> uints .input_menu_toggle_gamepad_combo ;
54405440 bool menu_driver_binding_state = (menu_st -> flags & MENU_ST_FLAG_IS_BINDING ) ? true : false;
5441- bool menu_is_alive = (menu_st -> flags & MENU_ST_FLAG_ALIVE ) ? true : false;
5441+ bool menu_was_alive = (menu_st -> flags & MENU_ST_FLAG_ALIVE ) ? true : false;
54425442 bool display_kb = menu_input_dialog_get_display_kb ();
54435443#endif
54445444#if defined(HAVE_GFX_WIDGETS )
@@ -5776,16 +5776,13 @@ static enum runloop_state_enum runloop_check_state(
57765776 if ( (pressed && !old_pressed )
57775777 || core_type_is_dummy )
57785778 {
5779- if (menu_is_alive )
5779+ if (menu_st -> flags & MENU_ST_FLAG_ALIVE )
57805780 {
57815781 if (rarch_is_initialized && !core_type_is_dummy )
57825782 retroarch_menu_running_finished (false);
57835783 }
57845784 else
57855785 retroarch_menu_running ();
5786-
5787- /* Update menu state if it has changed */
5788- menu_is_alive = (menu_st -> flags & MENU_ST_FLAG_ALIVE ) ? true : false;
57895786 }
57905787
57915788 old_pressed = pressed ;
@@ -5823,7 +5820,7 @@ static enum runloop_state_enum runloop_check_state(
58235820#endif
58245821
58255822#ifdef HAVE_MENU
5826- if (menu_is_alive )
5823+ if (menu_st -> flags & MENU_ST_FLAG_ALIVE )
58275824 {
58285825 enum menu_action action ;
58295826 static input_bits_t old_input = {{0 }};
@@ -5995,7 +5992,7 @@ static enum runloop_state_enum runloop_check_state(
59955992 (runloop_st -> flags & RUNLOOP_FLAG_IDLE ) ? true : false);
59965993 }
59975994
5998- if ( (menu_is_alive )
5995+ if ( (menu_st -> flags & MENU_ST_FLAG_ALIVE )
59995996 && !(runloop_st -> flags & RUNLOOP_FLAG_IDLE ))
60005997 if (display_menu_libretro (runloop_st , input_st ,
60015998 settings -> floats .slowmotion_ratio ,
@@ -6116,7 +6113,7 @@ static enum runloop_state_enum runloop_check_state(
61166113
61176114#ifdef HAVE_MENU
61186115 /* Don't allow rewinding while menu is active */
6119- if (menu_is_alive )
6116+ if (menu_st -> flags & MENU_ST_FLAG_ALIVE )
61206117 rewind_pressed = false;
61216118#endif
61226119
@@ -6137,7 +6134,7 @@ static enum runloop_state_enum runloop_check_state(
61376134 settings -> uints .rewind_granularity ,
61386135 runloop_paused
61396136#ifdef HAVE_MENU
6140- || ( (menu_is_alive )
6137+ || ( (menu_st -> flags & MENU_ST_FLAG_ALIVE )
61416138 && settings -> bools .menu_pause_libretro )
61426139#endif
61436140 ,
@@ -6163,7 +6160,7 @@ static enum runloop_state_enum runloop_check_state(
61636160
61646161 if (rewinding && runloop_paused
61656162#ifdef HAVE_MENU
6166- && !(menu_is_alive )
6163+ && !(menu_st -> flags & MENU_ST_FLAG_ALIVE )
61676164#endif
61686165 )
61696166 {
@@ -6183,7 +6180,7 @@ static enum runloop_state_enum runloop_check_state(
61836180
61846181 /* Check pause hotkey in menu */
61856182#ifdef HAVE_MENU
6186- if (menu_is_alive )
6183+ if (menu_st -> flags & MENU_ST_FLAG_ALIVE )
61876184 {
61886185 static bool old_pause_pressed = false;
61896186 bool pause_pressed = BIT256_GET (current_bits , RARCH_PAUSE_TOGGLE );
@@ -6200,7 +6197,7 @@ static enum runloop_state_enum runloop_check_state(
62006197
62016198#ifdef HAVE_MENU
62026199 /* Stop checking the rest of the hotkeys if menu is alive */
6203- if (menu_is_alive )
6200+ if (menu_st -> flags & MENU_ST_FLAG_ALIVE )
62046201 {
62056202 float fastforward_ratio = runloop_get_fastforward_ratio (settings ,
62066203 & runloop_st -> fastmotion_override .current );
@@ -6784,6 +6781,9 @@ static enum runloop_state_enum runloop_check_state(
67846781 return RUNLOOP_STATE_PAUSE ;
67856782 }
67866783
6784+ if (menu_was_alive )
6785+ return RUNLOOP_STATE_END ;
6786+
67876787 return RUNLOOP_STATE_ITERATE ;
67886788}
67896789
0 commit comments