mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Savestate: Make verify compare memory without emuhacks, and not count
The write pass stores memory with the JIT's emuhacks cleared, but the verify pass compared against memory that still had them, so it would report a mismatch under a JIT. Only EMULATOR_DEVCTL__VERIFY_STATE runs it, and nothing currently does. It also counted as a save in the generation. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
f96a58fb3e
commit
8d62ae04dd
1 file changed
+4
-1
+4
-1
@@ -176,7 +176,7 @@ int g_screenshotFailures;
|
||||
// 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) {
|
||||
if (MIPSComp::jit && (p.mode == p.MODE_WRITE || p.mode == p.MODE_VERIFY)) {
|
||||
if (MIPSComp::jit) {
|
||||
std::vector<u32> savedBlocks;
|
||||
savedBlocks = MIPSComp::jit->SaveAndClearEmuHackOps();
|
||||
@@ -968,7 +968,10 @@ int g_screenshotFailures;
|
||||
|
||||
case OperationType::Verify:
|
||||
{
|
||||
// Its write pass counts as a save, which it isn't.
|
||||
const int generation = saveStateGeneration;
|
||||
int tempResult = CChunkFileReader::Verify(state) == CChunkFileReader::ERROR_NONE;
|
||||
saveStateGeneration = generation;
|
||||
callbackResult = tempResult ? Status::SUCCESS : Status::FAILURE;
|
||||
if (tempResult) {
|
||||
INFO_LOG(Log::SaveState, "Verified save state system");
|
||||
|
||||
Reference in new issue
Block a user