diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index ce9256d6ed..66b1036295 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -2517,6 +2517,7 @@ bool rmenu_iterate(void) menu_stack_force_refresh(); g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_DRAW); device_ptr->ctx_driver->rmenu_init(); + g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_PREINIT); } diff --git a/frontend/menu/rmenu.h b/frontend/menu/rmenu.h index 79bfa11dde..314e0eed15 100644 --- a/frontend/menu/rmenu.h +++ b/frontend/menu/rmenu.h @@ -25,11 +25,11 @@ typedef struct { - unsigned char enum_id; /* enum ID of item */ - char text[64]; /* item label */ - char setting_text[64]; /* setting label */ - char comment[192]; /* item comment */ - unsigned char page; /* page */ + unsigned char enum_id; + char text[64]; + char setting_text[64]; + char comment[192]; + unsigned char page; } item; typedef struct rmenu_default_positions @@ -188,20 +188,20 @@ enum #define FIRST_VIDEO_SETTING 0 #define FIRST_AUDIO_SETTING SETTING_DEFAULT_VIDEO_ALL+1 -#define FIRST_EMU_SETTING SETTING_DEFAULT_AUDIO_ALL+1 -#define FIRST_EMU_VIDEO_SETTING SETTING_EMU_DEFAULT_ALL+1 -#define FIRST_EMU_AUDIO_SETTING SETTING_EMU_VIDEO_DEFAULT_ALL+1 -#define FIRST_PATH_SETTING SETTING_EMU_AUDIO_DEFAULT_ALL+1 -#define FIRST_CONTROLS_SETTING_PAGE_1 SETTING_PATH_DEFAULT_ALL+1 -#define FIRST_CONTROL_BIND SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_B +#define FIRST_EMU_SETTING SETTING_DEFAULT_AUDIO_ALL+1 +#define FIRST_EMU_VIDEO_SETTING SETTING_EMU_DEFAULT_ALL+1 +#define FIRST_EMU_AUDIO_SETTING SETTING_EMU_VIDEO_DEFAULT_ALL+1 +#define FIRST_PATH_SETTING SETTING_EMU_AUDIO_DEFAULT_ALL+1 +#define FIRST_CONTROLS_SETTING_PAGE_1 SETTING_PATH_DEFAULT_ALL+1 +#define FIRST_CONTROL_BIND SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_B #define MAX_NO_OF_VIDEO_SETTINGS SETTING_DEFAULT_VIDEO_ALL+1 #define MAX_NO_OF_AUDIO_SETTINGS SETTING_DEFAULT_AUDIO_ALL+1 -#define MAX_NO_OF_EMU_SETTINGS SETTING_EMU_DEFAULT_ALL+1 -#define MAX_NO_OF_EMU_VIDEO_SETTINGS SETTING_EMU_VIDEO_DEFAULT_ALL+1 -#define MAX_NO_OF_EMU_AUDIO_SETTINGS SETTING_EMU_AUDIO_DEFAULT_ALL+1 -#define MAX_NO_OF_PATH_SETTINGS SETTING_PATH_DEFAULT_ALL+1 -#define MAX_NO_OF_CONTROLS_SETTINGS SETTING_CONTROLS_DEFAULT_ALL+1 +#define MAX_NO_OF_EMU_SETTINGS SETTING_EMU_DEFAULT_ALL+1 +#define MAX_NO_OF_EMU_VIDEO_SETTINGS SETTING_EMU_VIDEO_DEFAULT_ALL+1 +#define MAX_NO_OF_EMU_AUDIO_SETTINGS SETTING_EMU_AUDIO_DEFAULT_ALL+1 +#define MAX_NO_OF_PATH_SETTINGS SETTING_PATH_DEFAULT_ALL+1 +#define MAX_NO_OF_CONTROLS_SETTINGS SETTING_CONTROLS_DEFAULT_ALL+1 void menu_init (void); bool rmenu_iterate(void); diff --git a/frontend/menu/utils/menu_stack.c b/frontend/menu/utils/menu_stack.c index c4640474ce..0b7f44278c 100644 --- a/frontend/menu/utils/menu_stack.c +++ b/frontend/menu/utils/menu_stack.c @@ -26,7 +26,7 @@ static bool need_refresh = false; static void menu_stack_pop(void) { - if(stack_idx > 0) + if(stack_idx > 1) { stack_idx--; need_refresh = true;