RetroAchievements: Add option to allow saving, but not loading, in challenge / hardcore mode.

This has been requested many times and is useful for development, so
let's simply allow it. It doesn't enable cheating for achievemenst since
you still can't load these states in challenge mode.
This commit is contained in:
Henrik Rydgård committed 2023-11-14 22:54:39 +01:00
1 parent 1dea3f80eb
commit 4c315bacdf
48 files changed
+59 -7

No files matched your search

+6 -2
View File
@@ -400,8 +400,12 @@ namespace SaveState
void Enqueue(SaveState::Operation op)
{
if (Achievements::ChallengeModeActive()) {
// No savestate operations are permitted, let's just ignore it.
return;
if (g_Config.bAchievementsSaveStateInChallengeMode && (op.type == SaveState::SAVESTATE_SAVE) || (op.type == SAVESTATE_SAVE_SCREENSHOT)) {
// We allow saving in challenge mode if this setting is on.
} else {
// Operation not allowed
return;
}
}
std::lock_guard<std::mutex> guard(mutex);