(RMenu) Prevent being able to pop filebrowser off menu stack

This commit is contained in:
twinaphex 2013-01-17 17:11:02 +01:00
parent 06e25decfd
commit 0ab9de154d
3 changed files with 18 additions and 17 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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;