From 6e4a5a96afdbe08943b791b7e90826efd20cf2a7 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Sun, 6 Mar 2022 01:21:55 -0800 Subject: [PATCH] [melonDS] reset caches after load state --- .../Consoles/Nintendo/NDS/LibMelonDS.cs | 3 +++ src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs index 93bac3c495..13223b79f8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/LibMelonDS.cs @@ -142,5 +142,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS [BizImport(CC)] public abstract void GetNANDData(byte[] buf); + + [BizImport(CC)] + public abstract void ResetCaches(); } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs index c48e6b4aef..31cfcf6674 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs @@ -359,6 +359,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS protected override void LoadStateBinaryInternal(BinaryReader reader) { + _core.ResetCaches(); SetMemoryCallbacks(); if (_frameThreadPtr != _core.GetFrameThreadProc()) {