summaryrefslogtreecommitdiff
path: root/Source/Core/Core/State.cpp
diff options
context:
space:
mode:
authorLillyJadeKatrin <lilly.kitty.1988@gmail.com>2024-02-16 14:25:04 -0500
committerLillyJadeKatrin <lilly.kitty.1988@gmail.com>2024-05-01 06:43:20 -0400
commit062720913136ddf25a61d9239a809115dbbc9050 (patch)
treec0623c8c82ecbaf4c78d929970f1581d64ad4158 /Source/Core/Core/State.cpp
parent70116b222d5063e309b06e6f568cc9660ad3e276 (diff)
Add DoState to AchievementManager
While state loading is not allowed in the hardcore mode that most players will use, it is allowed in softcore mode; more importantly, if something fails to unlock or unlocks when it shouldn't in either mode the player can create a save that retains the current achievement state.
Diffstat (limited to 'Source/Core/Core/State.cpp')
-rw-r--r--Source/Core/Core/State.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp
index 90f07d2756..4b3d0edfd0 100644
--- a/Source/Core/Core/State.cpp
+++ b/Source/Core/Core/State.cpp
@@ -98,7 +98,7 @@ static size_t s_state_writes_in_queue;
static std::condition_variable s_state_write_queue_is_empty;
// Don't forget to increase this after doing changes on the savestate system
-constexpr u32 STATE_VERSION = 167; // Last changed in PR 12494
+constexpr u32 STATE_VERSION = 168; // Last changed in PR 12639
// Increase this if the StateExtendedHeader definition changes
constexpr u32 EXTENDED_HEADER_VERSION = 1; // Last changed in PR 12217
@@ -198,6 +198,10 @@ static void DoState(Core::System& system, PointerWrap& p)
p.DoMarker("Wiimote");
Gecko::DoState(p);
p.DoMarker("Gecko");
+
+#ifdef USE_RETRO_ACHIEVEMENTS
+ AchievementManager::GetInstance().DoState(p);
+#endif // USE_RETRO_ACHIEVEMENTS
}
void LoadFromBuffer(Core::System& system, std::vector<u8>& buffer)