From 10a74657c35a7144b709208609b46e3b4ecee62d Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Mon, 21 Nov 2022 16:24:58 +0200 Subject: [PATCH] Move SRAM init to content init (#14653) --- intl/msg_hash_us.h | 16 ++++++++-------- retroarch.c | 2 -- runloop.c | 2 ++ tasks/task_content.c | 5 +---- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index b67bd771b1..8c8a3db950 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -12118,10 +12118,6 @@ MSG_HASH( MSG_AUTO_SAVE_STATE_TO, "Auto save state to" ) -MSG_HASH( - MSG_BLOCKING_SRAM_OVERWRITE, - "Blocking SRAM Overwrite" - ) MSG_HASH( MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT, "Bringing up command interface on port" @@ -12814,10 +12810,6 @@ MSG_HASH( MSG_SHADER_PRESET_SAVED_SUCCESSFULLY, "Shader preset saved successfully." ) -MSG_HASH( - MSG_SKIPPING_SRAM_LOAD, - "Skipping SRAM load." - ) MSG_HASH( MSG_SLOW_MOTION, "Slow-Motion." @@ -12830,10 +12822,18 @@ MSG_HASH( MSG_SLOW_MOTION_REWIND, "Slow-motion rewind." ) +MSG_HASH( + MSG_SKIPPING_SRAM_LOAD, + "Skipping SRAM load." + ) MSG_HASH( MSG_SRAM_WILL_NOT_BE_SAVED, "SRAM will not be saved." ) +MSG_HASH( + MSG_BLOCKING_SRAM_OVERWRITE, + "Blocking SRAM Overwrite" + ) MSG_HASH( MSG_STARTING_MOVIE_PLAYBACK, "Starting movie playback." diff --git a/retroarch.c b/retroarch.c index 2c215473b1..8dda760578 100644 --- a/retroarch.c +++ b/retroarch.c @@ -5528,8 +5528,6 @@ bool retroarch_main_init(int argc, char *argv[]) if (!string_is_empty(recording_st->path)) command_event(CMD_EVENT_RECORD_INIT, NULL); - runloop_path_init_savefile(); - command_event(CMD_EVENT_SET_PER_GAME_RESOLUTION, NULL); global->error_on_init = false; diff --git a/runloop.c b/runloop.c index 8a506e0c51..ecfa663d15 100644 --- a/runloop.c +++ b/runloop.c @@ -5200,6 +5200,8 @@ static bool event_init_content( command_event_set_savestate_auto_index(settings); + runloop_path_init_savefile(); + if (!event_load_save_files(runloop_st->flags & RUNLOOP_FLAG_IS_SRAM_LOAD_DISABLED)) RARCH_LOG("[SRAM]: %s\n", diff --git a/tasks/task_content.c b/tasks/task_content.c index 6028725e3f..52f11c9167 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -3098,13 +3098,10 @@ bool content_init(void) if (error_string) { if (ret) - { RARCH_LOG("[Content]: %s\n", error_string); - } else - { RARCH_ERR("[Content]: %s\n", error_string); - } + /* Do not flush the message queue here * > This allows any core-generated error messages * to propagate through to the frontend */