From 48a8a25548a9aa0ed73e4d0cb2d30471326481af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Zumer?= Date: Sun, 8 Dec 2019 17:13:56 -0500 Subject: [PATCH] Reset GBA cartridge state when loading a new ROM --- src/GBACart.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/GBACart.cpp b/src/GBACart.cpp index 7c2faad0..8ce76ab0 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);