Skip to content

Commit

Permalink
Core: Revert save state breakage.
Browse files Browse the repository at this point in the history
Any save states created in the interim will not be backwards compatible to
any HLE changes.
  • Loading branch information
unknownbrackets committed Dec 29, 2023
1 parent ecb7f93 commit c243f39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Core/SaveState.cpp
Expand Up @@ -367,6 +367,8 @@ namespace SaveState
}

// Memory is a bit tricky when jit is enabled, since there's emuhacks in it.
// These must be saved before copying out memory and restored after.
auto savedReplacements = SaveAndClearReplacements();
if (MIPSComp::jit && p.mode == p.MODE_WRITE) {
std::lock_guard<std::recursive_mutex> guard(MIPSComp::jitLock);
if (MIPSComp::jit) {
Expand All @@ -388,7 +390,6 @@ namespace SaveState
// Don't bother restoring if reading, we'll deal with that in KernelModuleDoState.
// In theory, different functions might have been runtime loaded in the state.
if (p.mode != p.MODE_READ) {
auto savedReplacements = SaveAndClearReplacements();
RestoreSavedReplacements(savedReplacements);
}

Expand Down

0 comments on commit c243f39

Please sign in to comment.