(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);
|
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);
|
int i = find_menu_driver_index(g_settings.menu.driver);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
|
|
|
@ -373,8 +373,20 @@ returntype main_entry(signature())
|
||||||
|
|
||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
{
|
{
|
||||||
RARCH_ERR("Couldn't initialize menu, exiting...\n");
|
RARCH_ERR("Couldn't initialize menu.\n");
|
||||||
returnfunc();
|
|
||||||
|
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)
|
if (driver.frontend_ctx && driver.frontend_ctx->process_args)
|
||||||
|
|
|
@ -316,16 +316,19 @@ void *menu_init(void)
|
||||||
{
|
{
|
||||||
rgui_handle_t *rgui;
|
rgui_handle_t *rgui;
|
||||||
|
|
||||||
if (!driver.menu_ctx)
|
rgui = NULL;
|
||||||
return 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)
|
if (!rgui)
|
||||||
{
|
return NULL;
|
||||||
RARCH_ERR("Could not initialize menu.\n");
|
|
||||||
rarch_fail(1, "menu_init()");
|
|
||||||
}
|
|
||||||
|
|
||||||
strlcpy(g_settings.menu.driver, driver.menu_ctx->ident, sizeof(g_settings.menu.driver));
|
strlcpy(g_settings.menu.driver, driver.menu_ctx->ident, sizeof(g_settings.menu.driver));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue