Add more ways to gracefully fail during content loading

This commit is contained in:
twinaphex 2016-02-07 13:08:14 +01:00
parent ff90a13a5e
commit 1b2cf74e12
3 changed files with 7 additions and 2 deletions

View File

@ -922,7 +922,8 @@ bool event_cmd_exec(void *data)
}
#if defined(HAVE_DYNAMIC)
rarch_ctl(RARCH_CTL_LOAD_CONTENT, NULL);
if (!rarch_ctl(RARCH_CTL_LOAD_CONTENT, NULL))
return false;
#else
frontend_driver_set_fork(FRONTEND_FORK_CORE_WITH_ARGS);
#endif

View File

@ -219,7 +219,8 @@ static bool menu_content_load_from_playlist(void *data)
else
menu_driver_ctl(RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, NULL);
event_cmd_exec((void*)path);
if (!event_cmd_exec((void*)path))
return false;
event_cmd_ctl(EVENT_CMD_LOAD_CORE, NULL);

View File

@ -1473,7 +1473,10 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
#ifdef HAVE_MENU
/* If content loading fails, we go back to menu. */
if (!menu_content_ctl(MENU_CONTENT_CTL_LOAD, NULL))
{
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
return false;
}
#endif
break;
case RARCH_CTL_MENU_RUNNING_FINISHED: