mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
(Console) Should bring up menu context in case it fails the first time
This commit is contained in:
parent
8fc357647d
commit
1416e47195
@ -76,7 +76,7 @@ void find_next_menu_driver(void)
|
||||
RARCH_WARN("Couldn't find any next menu driver (current one: \"%s\").\n", g_settings.menu.driver);
|
||||
}
|
||||
|
||||
static void find_menu_driver(void)
|
||||
void find_menu_driver(void)
|
||||
{
|
||||
int i = find_menu_driver_index(g_settings.menu.driver);
|
||||
if (i >= 0)
|
||||
|
@ -373,8 +373,20 @@ returntype main_entry(signature())
|
||||
|
||||
if (!driver.menu)
|
||||
{
|
||||
RARCH_ERR("Couldn't initialize menu, exiting...\n");
|
||||
returnfunc();
|
||||
RARCH_ERR("Couldn't initialize menu.\n");
|
||||
|
||||
if (!driver.menu_ctx)
|
||||
{
|
||||
RARCH_WARN("Trying to bring up menu context interface.\n");
|
||||
find_menu_driver();
|
||||
}
|
||||
|
||||
if (!(driver.menu = (rgui_handle_t*)menu_init()))
|
||||
{
|
||||
RARCH_ERR("Couldn't initialize menu (2nd attempt).\n");
|
||||
rarch_fail(1, "main_entry()");
|
||||
returnfunc();
|
||||
}
|
||||
}
|
||||
|
||||
if (driver.frontend_ctx && driver.frontend_ctx->process_args)
|
||||
|
@ -316,16 +316,19 @@ void *menu_init(void)
|
||||
{
|
||||
rgui_handle_t *rgui;
|
||||
|
||||
if (!driver.menu_ctx)
|
||||
return NULL;
|
||||
rgui = NULL;
|
||||
|
||||
rgui = (rgui_handle_t*)driver.menu_ctx->init();
|
||||
if (!driver.menu_ctx)
|
||||
{
|
||||
RARCH_ERR("menu_init() - menu context interface not initialized.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (driver.menu_ctx->init)
|
||||
rgui = (rgui_handle_t*)driver.menu_ctx->init();
|
||||
|
||||
if (!rgui)
|
||||
{
|
||||
RARCH_ERR("Could not initialize menu.\n");
|
||||
rarch_fail(1, "menu_init()");
|
||||
}
|
||||
return NULL;
|
||||
|
||||
strlcpy(g_settings.menu.driver, driver.menu_ctx->ident, sizeof(g_settings.menu.driver));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user