From 4e76fff2d8bd3062e0f88816b596a1d2b36520e0 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Sat, 30 Apr 2022 19:56:39 -0700 Subject: [PATCH] [mGBA] dont let read/write callbacks be called via execute callbacks --- .../Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs index 490a028e71..189b6cdf94 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAMemoryCallbackSystem.cs @@ -157,7 +157,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { foreach (var cb in _callbacks) { - if (cb.Callback.Address == pc) + if (cb.Callback.Type == MemoryCallbackType.Execute && cb.Callback.Address == pc) { cb.Callback.Callback?.Invoke(pc, 0, (uint)MemoryCallbackFlags.AccessExecute); }