mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Return to RGUI when core shuts down.
Don't do this on consoles (uses dummy core).
This commit is contained in:
parent
283c6f9c6d
commit
c90a8bcfec
@ -166,6 +166,12 @@ static void rarch_get_environment_console(void)
|
||||
#define attempt_load_game_fails (1ULL << MODE_EXIT)
|
||||
#endif
|
||||
|
||||
#if defined(RARCH_CONSOLE)
|
||||
#define load_dummy_on_core_shutdown false
|
||||
#else
|
||||
#define load_dummy_on_core_shutdown true
|
||||
#endif
|
||||
|
||||
#define frontend_init_enable true
|
||||
#define menu_init_enable true
|
||||
#define initial_lifecycle_state_preinit false
|
||||
@ -176,7 +182,15 @@ int main_entry_iterate(signature(), args_type() args)
|
||||
static retro_keyboard_event_t key_event;
|
||||
|
||||
if (g_extern.system.shutdown)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
// Load dummy core instead of exiting RetroArch completely.
|
||||
if (load_dummy_on_core_shutdown)
|
||||
load_menu_game_prepare_dummy();
|
||||
else
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
else if (g_extern.lifecycle_state & (1ULL << MODE_LOAD_GAME))
|
||||
{
|
||||
load_menu_game_prepare();
|
||||
|
@ -347,6 +347,17 @@ static void menu_update_libretro_info(void)
|
||||
rgui->core_info = core_info_list_new(rgui->libretro_dir);
|
||||
}
|
||||
|
||||
void load_menu_game_prepare_dummy(void)
|
||||
{
|
||||
// Starts dummy core.
|
||||
*g_extern.fullpath = '\0';
|
||||
rgui->load_no_rom = false;
|
||||
|
||||
g_extern.lifecycle_state |= (1ULL << MODE_LOAD_GAME);
|
||||
g_extern.lifecycle_state &= ~(1ULL << MODE_GAME);
|
||||
g_extern.system.shutdown = false;
|
||||
}
|
||||
|
||||
bool load_menu_game(void)
|
||||
{
|
||||
if (g_extern.main_is_init)
|
||||
|
@ -359,6 +359,7 @@ void menu_parse_and_resolve(void *data, unsigned menu_type);
|
||||
void menu_init_core_info(void *data);
|
||||
|
||||
void load_menu_game_prepare(void);
|
||||
void load_menu_game_prepare_dummy(void);
|
||||
bool load_menu_game(void);
|
||||
void load_menu_game_history(unsigned game_index);
|
||||
extern void load_menu_game_new_core(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user