SaveStates: Add error messages on screen

This commit is contained in:
Eladash 2024-03-29 09:31:54 +03:00 committed by Elad Ashkenazi
parent ec37e8f0dc
commit 7285af4771
3 changed files with 17 additions and 0 deletions

View file

@ -2848,8 +2848,13 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
if (!g_cfg.savestate.compatible_mode) if (!g_cfg.savestate.compatible_mode)
{ {
rsx::overlays::queue_message(localized_string_id::SAVESTATE_FAILED_DUE_TO_MISSING_SPU_SETTING);
sys_log.error("Enabling SPU Savestates-Compatible Mode in Advanced tab may fix this."); sys_log.error("Enabling SPU Savestates-Compatible Mode in Advanced tab may fix this.");
} }
else
{
rsx::overlays::queue_message(localized_string_id::SAVESTATE_FAILED_DUE_TO_SPU);
}
m_emu_state_close_pending = false; m_emu_state_close_pending = false;
@ -2878,6 +2883,8 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
if (vdec_error) if (vdec_error)
{ {
rsx::overlays::queue_message(localized_string_id::SAVESTATE_FAILED_DUE_TO_VDEC);
sys_log.error("Failed to savestate: HLE VDEC (video decoder) context(s) exist." sys_log.error("Failed to savestate: HLE VDEC (video decoder) context(s) exist."
"\nLLE libvdec.sprx by selecting it in Advanced tab -> Firmware Libraries." "\nLLE libvdec.sprx by selecting it in Advanced tab -> Firmware Libraries."
"\nYou need to close the game for it to take effect." "\nYou need to close the game for it to take effect."
@ -2886,6 +2893,8 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
if (savedata_error) if (savedata_error)
{ {
rsx::overlays::queue_message(localized_string_id::SAVESTATE_FAILED_DUE_TO_SAVEDATA);
sys_log.error("Failed to savestate: Savedata operation is active." sys_log.error("Failed to savestate: Savedata operation is active."
"\nYour best chance is to wait for the current game saving operation to finish and retry." "\nYour best chance is to wait for the current game saving operation to finish and retry."
"\nThe game is probably displaying a saving cicrle or other gesture to indicate that it is saving."); "\nThe game is probably displaying a saving cicrle or other gesture to indicate that it is saving.");

View file

@ -190,4 +190,8 @@ enum class localized_string_id
EMULATION_PAUSED_RESUME_WITH_START, EMULATION_PAUSED_RESUME_WITH_START,
EMULATION_RESUMING, EMULATION_RESUMING,
EMULATION_FROZEN, EMULATION_FROZEN,
SAVESTATE_FAILED_DUE_TO_VDEC,
SAVESTATE_FAILED_DUE_TO_SAVEDATA,
SAVESTATE_FAILED_DUE_TO_SPU,
SAVESTATE_FAILED_DUE_TO_MISSING_SPU_SETTING,
}; };

View file

@ -209,6 +209,10 @@ private:
case localized_string_id::EMULATION_PAUSED_RESUME_WITH_START: return tr("Press and hold the START button to resume"); case localized_string_id::EMULATION_PAUSED_RESUME_WITH_START: return tr("Press and hold the START button to resume");
case localized_string_id::EMULATION_RESUMING: return tr("Resuming...!"); case localized_string_id::EMULATION_RESUMING: return tr("Resuming...!");
case localized_string_id::EMULATION_FROZEN: return tr("The PS3 application has likely crashed, you can close it."); case localized_string_id::EMULATION_FROZEN: return tr("The PS3 application has likely crashed, you can close it.");
case localized_string_id::SAVESTATE_FAILED_DUE_TO_SAVEDATA: return tr("SaveState failed: Game saving is in progress, wait until finished.");
case localized_string_id::SAVESTATE_FAILED_DUE_TO_VDEC: return tr("SaveState failed: VDEC-base video/cutscenes are in order, wait for them to end or enable libvdec.sprx.");
case localized_string_id::SAVESTATE_FAILED_DUE_TO_MISSING_SPU_SETTING: return tr("SaveState failed: Failed to lock SPU state, enabling SPU-Compatible mode may fix it.");
case localized_string_id::SAVESTATE_FAILED_DUE_TO_SPU: return tr("SaveState failed: Failed to lock SPU state, using SPU ASMJIT will fix it.");
case localized_string_id::INVALID: return tr("Invalid"); case localized_string_id::INVALID: return tr("Invalid");
default: return tr("Unknown"); default: return tr("Unknown");
} }