From 48a8a25548a9aa0ed73e4d0cb2d30471326481af Mon Sep 17 00:00:00 2001 From: Raphaƫl Zumer Date: Sun, 8 Dec 2019 17:13:56 -0500 Subject: Reset GBA cartridge state when loading a new ROM --- src/GBACart.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/GBACart.cpp b/src/GBACart.cpp index 7c2faad..8ce76ab 100644 --- a/src/GBACart.cpp +++ b/src/GBACart.cpp @@ -156,6 +156,11 @@ bool LoadROM(const char* path, const char* sram) return false; } + if (CartInserted) + { + Reset(); + } + fseek(f, 0, SEEK_END); u32 len = (u32)ftell(f); -- cgit v1.2.3