From b01c2d3f837c491e84b0313606984e4e4fbd6557 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 6 Jan 2019 15:01:52 -0500 Subject: [PATCH] Fixed issues when loading states for mapper 48 games (e.g: Don Doko Don 2) This was caused by an old fix for MMC3 save states (AfterLoadState) that is no longer needed (because using SetCpuMemoryMapping no longer requires manually restoring the state) --- Core/MMC3.h | 5 ----- Core/Snapshotable.cpp | 2 -- Core/Snapshotable.h | 1 - 3 files changed, 8 deletions(-) diff --git a/Core/MMC3.h b/Core/MMC3.h index 77fcfbbe..42566e45 100644 --- a/Core/MMC3.h +++ b/Core/MMC3.h @@ -195,11 +195,6 @@ class MMC3 : public BaseMapper _wramEnabled, _wramWriteProtected, registers, _needIrq); } - void AfterLoadState() override - { - UpdateState(); - } - virtual uint16_t GetPRGPageSize() override { return 0x2000; } virtual uint16_t GetCHRPageSize() override { return 0x0400; } virtual uint32_t GetSaveRamPageSize() override { return _romInfo.SubMapperID == 1 ? 0x200 : 0x2000; } diff --git a/Core/Snapshotable.cpp b/Core/Snapshotable.cpp index d3b0c335..c31f6543 100644 --- a/Core/Snapshotable.cpp +++ b/Core/Snapshotable.cpp @@ -99,8 +99,6 @@ void Snapshotable::LoadSnapshot(istream* file, uint32_t stateVersion) file->read((char*)_stream, _streamSize); StreamState(_saving); - AfterLoadState(); - delete[] _stream; if(_blockBuffer) { diff --git a/Core/Snapshotable.h b/Core/Snapshotable.h index 2ef3689f..1b12034d 100644 --- a/Core/Snapshotable.h +++ b/Core/Snapshotable.h @@ -213,7 +213,6 @@ private: protected: virtual void StreamState(bool saving) = 0; - virtual void AfterLoadState() { } uint32_t GetStateVersion() { return _stateVersion; }