Allow INI combo switch only in main or system page.
This commit is contained in:
28
menu.cpp
28
menu.cpp
@@ -843,6 +843,7 @@ static int wm_y = 0;
|
||||
static int wm_ok = 0;
|
||||
static int wm_side = 0;
|
||||
static uint16_t wm_pos[4] = {};
|
||||
static int page = 0;
|
||||
|
||||
void HandleUI(void)
|
||||
{
|
||||
@@ -881,7 +882,6 @@ void HandleUI(void)
|
||||
static int flash_state = 0;
|
||||
static uint32_t dip_submenu;
|
||||
static int need_reset = 0;
|
||||
static int page = 0;
|
||||
static int flat = 0;
|
||||
static int menusub_parent = 0;
|
||||
static char title[32] = {};
|
||||
@@ -5862,3 +5862,29 @@ int menu_lightgun_cb(uint16_t type, uint16_t code, int value)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_allow_cfg_switch()
|
||||
{
|
||||
if (user_io_osd_is_visible())
|
||||
{
|
||||
switch (menustate)
|
||||
{
|
||||
case MENU_ST_MAIN2:
|
||||
case MENU_ARCHIE_MAIN2:
|
||||
case MENU_MAIN2:
|
||||
case MENU_8BIT_SYSTEM2:
|
||||
case MENU_SYSTEM2:
|
||||
return 1;
|
||||
|
||||
case MENU_FILE_SELECT2:
|
||||
if (is_menu() && (fs_Options & SCANO_CORES)) return 1;
|
||||
break;
|
||||
|
||||
case MENU_8BIT_MAIN2:
|
||||
if (!page) return 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user