mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Move EVENT_CMD_PREPARE_DUMMY to rarch_main_ctl
This commit is contained in:
parent
96f1a417ed
commit
fa0e2032c6
@ -1214,22 +1214,8 @@ bool event_command(enum event_command cmd)
|
||||
if (!take_screenshot())
|
||||
return false;
|
||||
break;
|
||||
case EVENT_CMD_PREPARE_DUMMY:
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (menu)
|
||||
menu->load_no_content = false;
|
||||
#endif
|
||||
rarch_main_data_clear_state();
|
||||
|
||||
rarch_main_ctl(RARCH_MAIN_CTL_CLEAR_CONTENT_PATH, NULL);
|
||||
|
||||
rarch_ctl(RARCH_ACTION_STATE_LOAD_CONTENT, NULL);
|
||||
}
|
||||
break;
|
||||
case EVENT_CMD_UNLOAD_CORE:
|
||||
event_command(EVENT_CMD_PREPARE_DUMMY);
|
||||
rarch_main_ctl(RARCH_MAIN_CTL_PREPARE_DUMMY, NULL);
|
||||
event_command(EVENT_CMD_LOAD_CORE_DEINIT);
|
||||
break;
|
||||
case EVENT_CMD_QUIT:
|
||||
|
@ -46,8 +46,6 @@ enum event_command
|
||||
EVENT_CMD_SAVE_STATE_INCREMENT,
|
||||
/* Takes screenshot. */
|
||||
EVENT_CMD_TAKE_SCREENSHOT,
|
||||
/* Initializes dummy core. */
|
||||
EVENT_CMD_PREPARE_DUMMY,
|
||||
/* Quits RetroArch. */
|
||||
EVENT_CMD_QUIT,
|
||||
/* Reinitialize all drivers. */
|
||||
|
@ -1337,7 +1337,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
global->block_config_read = false;
|
||||
*settings->libretro = '\0'; /* Load core in new config. */
|
||||
}
|
||||
event_command(EVENT_CMD_PREPARE_DUMMY);
|
||||
rarch_main_ctl(RARCH_MAIN_CTL_PREPARE_DUMMY, NULL);
|
||||
return true;
|
||||
case RARCH_ACTION_STATE_MENU_RUNNING:
|
||||
#ifdef HAVE_MENU
|
||||
|
16
runloop.c
16
runloop.c
@ -767,6 +767,20 @@ bool rarch_main_ctl(enum rarch_main_ctl_state state, void *data)
|
||||
rarch_main_ctl(RARCH_MAIN_CTL_MSG_QUEUE_DEINIT, NULL);
|
||||
rarch_main_msg_queue_init();
|
||||
break;
|
||||
case RARCH_MAIN_CTL_PREPARE_DUMMY:
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (menu)
|
||||
menu->load_no_content = false;
|
||||
#endif
|
||||
rarch_main_data_clear_state();
|
||||
|
||||
rarch_main_ctl(RARCH_MAIN_CTL_CLEAR_CONTENT_PATH, NULL);
|
||||
|
||||
rarch_ctl(RARCH_ACTION_STATE_LOAD_CONTENT, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@ -921,7 +935,7 @@ static INLINE int rarch_main_iterate_time_to_exit(event_cmd_state_t *cmd)
|
||||
if (global->core_shutdown_initiated
|
||||
&& settings->load_dummy_on_core_shutdown)
|
||||
{
|
||||
if (!event_command(EVENT_CMD_PREPARE_DUMMY))
|
||||
if (!rarch_main_ctl(RARCH_MAIN_CTL_PREPARE_DUMMY, NULL))
|
||||
return -1;
|
||||
|
||||
system->shutdown = false;
|
||||
|
@ -69,7 +69,9 @@ enum rarch_main_ctl_state
|
||||
/* Initializes message queue. */
|
||||
RARCH_MAIN_CTL_MSG_QUEUE_INIT,
|
||||
/* Deinitializes message queue. */
|
||||
RARCH_MAIN_CTL_MSG_QUEUE_DEINIT
|
||||
RARCH_MAIN_CTL_MSG_QUEUE_DEINIT,
|
||||
/* Initializes dummy core. */
|
||||
RARCH_MAIN_CTL_PREPARE_DUMMY
|
||||
};
|
||||
|
||||
typedef struct rarch_dir_list
|
||||
|
Loading…
Reference in New Issue
Block a user