From 7d14efc331849f77d2bbef50331ebd587147ebac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 5 Sep 2026 13:34:12 -0600 Subject: [PATCH] Say why a savestate is refused while online, instead of dropping it silently Same problem as the hardcore checks: SaveState.cpp asked NetworkAllowSaveState() and just returned, so a load or save refused because you're connected did nothing at all, with no explanation. Switched all eight to NetworkWarnUserIfOnlineAndCantSavestate(), which is the same predicate plus the standard message; its OSD id already collapses duplicates for the paths that check twice on the way in. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01GgACRqkQNpfJQ4fjwyoEup --- Core/SaveState.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 309e36c63c..1dee9fa660 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -197,13 +197,14 @@ int g_screenshotFailures; } void Enqueue(const SaveState::Operation &op) { - if (!NetworkAllowSaveState()) { + // These two both refuse the operation, and both say so - dropping it silently just + // looks like the hotkey didn't work. Callers that ask the same questions themselves + // return before getting here, so nothing shows a message twice. + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return; } // Hardcore mode bans loading savestates outright, and saving too unless the user opted - // back into that. Callers that ask WarnUserIfHardcoreModeActive themselves never get - // this far, so there's no double message - this is for the paths that go straight to - // the queue, like --state and auto-load. + // back into that. if (Achievements::WarnUserIfHardcoreModeActive(op.type == OperationType::Save)) { return; } @@ -217,7 +218,7 @@ int g_screenshotFailures; } void Load(const Path &filename, int slot, Callback callback) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return; } @@ -228,7 +229,7 @@ int g_screenshotFailures; } void Save(const Path &filename, int slot, Callback callback) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return; } @@ -398,7 +399,7 @@ int g_screenshotFailures; } void LoadSlot(std::string_view gamePrefix, int slot, Callback callback) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return; } @@ -439,7 +440,7 @@ int g_screenshotFailures; } bool UndoLoad(std::string_view gamePrefix, Callback callback) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return false; } @@ -465,7 +466,7 @@ int g_screenshotFailures; } void SaveSlot(std::string_view gamePrefix, int slot, Callback callback) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return; } @@ -510,7 +511,7 @@ int g_screenshotFailures; } bool UndoSaveSlot(std::string_view gamePrefix, int slot) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return false; } @@ -543,7 +544,7 @@ int g_screenshotFailures; } bool UndoLastSave(std::string_view gamePrefix) { - if (!NetworkAllowSaveState()) { + if (NetworkWarnUserIfOnlineAndCantSavestate()) { return false; }