From 2a35af5bb946d520000502c8f7405e27967b1d1f Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Wed, 6 Dec 2023 09:10:30 -0500 Subject: Soften restrictions around `ARMJIT_Memory::RemapNWRAM` - If in NDS mode, return instead of `assert`ing - Use `static_cast` and `ConsoleType` instead of `dynamic_cast` --- src/ARMJIT_Memory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ARMJIT_Memory.cpp b/src/ARMJIT_Memory.cpp index bf1fb06..101e3b1 100644 --- a/src/ARMJIT_Memory.cpp +++ b/src/ARMJIT_Memory.cpp @@ -473,8 +473,10 @@ void ARMJIT_Memory::RemapDTCM(u32 newBase, u32 newSize) noexcept void ARMJIT_Memory::RemapNWRAM(int num) noexcept { - auto* dsi = dynamic_cast(&NDS); - assert(dsi != nullptr); + if (NDS.ConsoleType == 0) + return; + + auto* dsi = static_cast(&NDS); for (int i = 0; i < Mappings[memregion_SharedWRAM].Length;) { Mapping& mapping = Mappings[memregion_SharedWRAM][i]; -- cgit v1.2.3