From 510bed66552f28c77ceaadaeabe3bd8a89484d91 Mon Sep 17 00:00:00 2001 From: IAmBoring <76928465+IAmBoring@users.noreply.github.com> Date: Thu, 7 Jan 2021 03:38:27 +0000 Subject: [PATCH] Core run init failure forces return to menu Gracefully loads dummy core instead of running lots of unexpected bad behavior. --- retroarch.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/retroarch.c b/retroarch.c index 489f6bed9a..1f7e66274a 100644 --- a/retroarch.c +++ b/retroarch.c @@ -34536,7 +34536,7 @@ bool retroarch_main_init(int argc, char *argv[]) { RARCH_ERR("%s: \"%s\"\n", msg_hash_to_str(MSG_FATAL_ERROR_RECEIVED_IN), p_rarch->error_string); - return false; + goto error; } p_rarch->rarch_error_on_init = true; @@ -36799,7 +36799,15 @@ static enum runloop_state runloop_check_state( } if (!menu_driver_iterate(&iter, current_time)) - retroarch_menu_running_finished(false); + { + if (p_rarch->rarch_error_on_init) + { + content_ctx_info_t content_info = {0}; + task_push_start_dummy_core(&content_info); + } + else + retroarch_menu_running_finished(false); + } if (focused || !p_rarch->runloop_idle) {