MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / SaveState_ReportLoadErrorOSD

Function SaveState_ReportLoadErrorOSD

pcsx2/SaveState.cpp:1238–1257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236}
1237
1238void SaveState_ReportLoadErrorOSD(const std::string& message, std::optional<s32> slot, bool backup)
1239{
1240 std::string full_message;
1241 if (slot.has_value())
1242 {
1243 if (backup)
1244 full_message = fmt::format(
1245 TRANSLATE_FS("SaveState", "Failed to load state from backup slot {}: {}"), *slot, message);
1246 else
1247 full_message = fmt::format(
1248 TRANSLATE_FS("SaveState", "Failed to load state from slot {}: {}"), *slot, message);
1249 }
1250 else
1251 {
1252 full_message = fmt::format(TRANSLATE_FS("SaveState", "Failed to load state: {}"), message);
1253 }
1254
1255 Host::AddIconOSDMessage("LoadState", ICON_FA_TRIANGLE_EXCLAMATION,
1256 full_message, Host::OSD_WARNING_DURATION);
1257}
1258
1259void SaveState_ReportSaveErrorOSD(const std::string& message, std::optional<s32> slot)
1260{

Callers 3

reportStateLoadErrorMethod · 0.85
ParseCommandMethod · 0.85
ReportStateLoadErrorMethod · 0.85

Calls 1

formatFunction · 0.50

Tested by

no test coverage detected