Cleanups - retroarch_main_init
This commit is contained in:
parent
ebeb081562
commit
bece01093d
14
retroarch.c
14
retroarch.c
|
@ -1292,7 +1292,6 @@ static void retroarch_validate_cpu_features(void)
|
||||||
bool retroarch_main_init(int argc, char *argv[])
|
bool retroarch_main_init(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
bool init_failed = false;
|
bool init_failed = false;
|
||||||
bool menu_alive = false;
|
|
||||||
|
|
||||||
retroarch_init_state();
|
retroarch_init_state();
|
||||||
|
|
||||||
|
@ -1367,11 +1366,6 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||||
|
|
||||||
driver_ctl(RARCH_DRIVER_CTL_INIT_PRE, NULL);
|
driver_ctl(RARCH_DRIVER_CTL_INIT_PRE, NULL);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
/* Check if menu is active */
|
|
||||||
menu_alive = menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Attempt to initialize core */
|
/* Attempt to initialize core */
|
||||||
if (current_core_explicitly_set)
|
if (current_core_explicitly_set)
|
||||||
{
|
{
|
||||||
|
@ -1387,21 +1381,19 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
/* Check if menu was active prior to core initialization */
|
/* Check if menu was active prior to core initialization */
|
||||||
if (menu_alive)
|
if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL))
|
||||||
{
|
{
|
||||||
/* Attemot initializing dummy core */
|
/* Attempt initializing dummy core */
|
||||||
current_core_type = CORE_TYPE_DUMMY;
|
current_core_type = CORE_TYPE_DUMMY;
|
||||||
if (!command_event(CMD_EVENT_CORE_INIT, ¤t_core_type))
|
if (!command_event(CMD_EVENT_CORE_INIT, ¤t_core_type))
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
/* Fall back to regular error handling */
|
/* Fall back to regular error handling */
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
goto error;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
driver_ctl(RARCH_DRIVER_CTL_INIT_ALL, NULL);
|
driver_ctl(RARCH_DRIVER_CTL_INIT_ALL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue