diff --git a/frontend/frontend.c b/frontend/frontend.c index 3708bb64d9..3e15d1ab90 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -24,6 +24,7 @@ #include "frontend.h" #include "../ui/ui_companion_driver.h" +#include "../tasks/tasks_internal.h" #include "../defaults.h" #include "../content.h" @@ -126,7 +127,15 @@ int rarch_main(int argc, char *argv[], void *data) info.args = args; info.environ_get = frontend_driver_environment_get_ptr(); - if (!content_load(&info)) + if (!rarch_task_push_content_load_default( + NULL, + NULL, + false, + &info, + CORE_TYPE_PLAIN, + CONTENT_MODE_LOAD_FROM_CLI, + NULL, + NULL)) return 0; } diff --git a/tasks/task_content.c b/tasks/task_content.c index 6baa6e5790..7fd79842cf 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -188,6 +188,10 @@ bool rarch_task_push_content_load_default( { case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE: break; + case CONTENT_MODE_LOAD_FROM_CLI: + if (!content_load_wrapper(content_info, false)) + goto error; + break; case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL); #ifdef HAVE_MENU @@ -281,7 +285,7 @@ bool rarch_task_push_content_load_default( } #ifdef HAVE_MENU - if (type != CORE_TYPE_DUMMY) + if (type != CORE_TYPE_DUMMY && mode != CONTENT_MODE_LOAD_FROM_CLI) { menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUIT, NULL); menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL); diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 64e76d50af..212cec54c7 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -37,6 +37,7 @@ enum content_mode_load { CONTENT_MODE_LOAD_NONE = 0, CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE, + CONTENT_MODE_LOAD_FROM_CLI, CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU, CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU, CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU,