mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
(RARCH_CONSOLE) frontend_console cleanups
This commit is contained in:
parent
2ad74ead6c
commit
bc4e010a96
@ -47,6 +47,12 @@ static void init_drivers_console(void)
|
||||
init_audio();
|
||||
}
|
||||
|
||||
static void uninit_drivers_console(void)
|
||||
{
|
||||
driver.input->free(NULL);
|
||||
driver.video->stop();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
system_init();
|
||||
@ -115,9 +121,16 @@ begin_loop:
|
||||
int init_ret = rarch_main_init_wrap(&args);
|
||||
|
||||
if (init_ret == 0)
|
||||
{
|
||||
RARCH_LOG("rarch_main_init succeeded.\n");
|
||||
g_extern.console.rmenu.mode = MODE_EMULATION;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_ERR("rarch_main_init failed.\n");
|
||||
g_extern.console.rmenu.mode = MODE_MENU;
|
||||
rarch_settings_msg(S_MSG_ROM_LOADING_ERROR, S_DELAY_180);
|
||||
}
|
||||
}
|
||||
else if(g_extern.console.rmenu.mode == MODE_MENU)
|
||||
while(rmenu_iterate());
|
||||
@ -134,9 +147,8 @@ begin_shutdown:
|
||||
if(g_extern.main_is_init)
|
||||
rarch_main_deinit();
|
||||
|
||||
driver.input->free(NULL);
|
||||
driver.video->stop();
|
||||
menu_free();
|
||||
uninit_drivers_console();
|
||||
|
||||
#ifdef HAVE_LOGGER
|
||||
logger_shutdown();
|
||||
|
11
retroarch.c
11
retroarch.c
@ -2944,17 +2944,6 @@ int rarch_main_init_wrap(const struct rarch_main_wrap *args)
|
||||
|
||||
int ret = rarch_main_init(argc, argv);
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
if (ret == 0)
|
||||
g_extern.console.rmenu.mode = MODE_EMULATION;
|
||||
else
|
||||
{
|
||||
//failed to load the ROM for whatever reason
|
||||
g_extern.console.rmenu.mode = MODE_MENU;
|
||||
rarch_settings_msg(S_MSG_ROM_LOADING_ERROR, S_DELAY_180);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(argv_copy); i++)
|
||||
free(argv_copy[i]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user