diff --git a/src/core/hotkeys.cpp b/src/core/hotkeys.cpp index 66378cc7b..9a002684b 100644 --- a/src/core/hotkeys.cpp +++ b/src/core/hotkeys.cpp @@ -110,8 +110,8 @@ static void HotkeySaveStateSlot(bool global, s32 slot) Error error; if (!System::SaveState(path.c_str(), &error, g_settings.create_save_state_backups)) { - Host::AddKeyedOSDMessage( - "SaveState", + Host::AddIconOSDMessage( + "SaveState", ICON_FA_EXCLAMATION_TRIANGLE, fmt::format(TRANSLATE_FS("OSDMessage", "Failed to save state to slot {0}:\n{1}"), slot, error.GetDescription()), Host::OSD_ERROR_DURATION); } diff --git a/src/core/imgui_overlays.cpp b/src/core/imgui_overlays.cpp index 8a47f2761..15b0ff5de 100644 --- a/src/core/imgui_overlays.cpp +++ b/src/core/imgui_overlays.cpp @@ -1143,7 +1143,7 @@ void SaveStateSelectorUI::SaveCurrentSlot() Error error; if (!System::SaveState(path.c_str(), &error, g_settings.create_save_state_backups)) { - Host::AddKeyedOSDMessage("SaveState", + Host::AddIconOSDMessage("SaveState", ICON_FA_EXCLAMATION_TRIANGLE, fmt::format(TRANSLATE_FS("OSDMessage", "Failed to save state to slot {0}:\n{1}"), GetCurrentSlot(), error.GetDescription()), Host::OSD_ERROR_DURATION); diff --git a/src/core/system.cpp b/src/core/system.cpp index 83e8c4314..92c6f98a9 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1345,6 +1345,12 @@ bool System::LoadState(const char* filename, Error* error) bool System::SaveState(const char* filename, Error* error, bool backup_existing_save) { + if (IsSavingMemoryCards()) + { + Error::SetStringView(error, TRANSLATE_SV("System", "Cannot save state while memory card is being saved.")); + return false; + } + if (backup_existing_save && FileSystem::FileExists(filename)) { Error backup_error; @@ -1365,7 +1371,7 @@ bool System::SaveState(const char* filename, Error* error, bool backup_existing_ error); if (!stream) { - Error::AddPrefixFmt(error, "Failed to save state to '{}': ", Path::GetFileName(filename)); + Error::AddPrefixFmt(error, "Cannot open '{}': ", Path::GetFileName(filename)); return false; }