Move code to task_content.c

This commit is contained in:
twinaphex 2016-05-16 17:14:05 +02:00
parent fa5971737e
commit d681d30249
2 changed files with 10 additions and 9 deletions

View File

@ -739,14 +739,7 @@ static bool runloop_is_frame_count_end(void)
bool runloop_prepare_dummy(void)
{
content_ctx_info_t content_info = {0};
memset(&runloop_frame_time, 0, sizeof(struct retro_frame_time_callback));
#ifdef HAVE_MENU
menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL);
#endif
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
runloop_ctl(RUNLOOP_CTL_TASK_INIT, NULL);
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
runloop_ctl(RUNLOOP_CTL_STATE_FREE, NULL);
return rarch_task_push_content_load_default(
NULL, NULL,
true,
@ -756,7 +749,6 @@ bool runloop_prepare_dummy(void)
NULL, NULL);
}
bool runloop_ctl(enum runloop_ctl_state state, void *data)
{
settings_t *settings = config_get_ptr();

View File

@ -1937,6 +1937,15 @@ bool rarch_task_push_content_load_default(
switch (mode)
{
case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE:
#ifdef HAVE_MENU
menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL);
#endif
runloop_ctl(RUNLOOP_CTL_DATA_DEINIT, NULL);
runloop_ctl(RUNLOOP_CTL_TASK_INIT, NULL);
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
if (!content_load_wrapper(content_info, false))
goto error;
break;
case CONTENT_MODE_LOAD_FROM_CLI:
if (!content_load_wrapper(content_info, false))
goto error;