diff options
author | Jesse Talavera-Greenberg <jesse@jesse.tg> | 2023-12-06 09:10:30 -0500 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-12-08 17:19:00 +0100 |
commit | 2a35af5bb946d520000502c8f7405e27967b1d1f (patch) | |
tree | af54873e7745652d8203afd7d6431997830b9453 | |
parent | 1b7b5106e24d1bad0776c97696f834209e30d900 (diff) |
Soften restrictions around `ARMJIT_Memory::RemapNWRAM`
- If in NDS mode, return instead of `assert`ing
- Use `static_cast` and `ConsoleType` instead of `dynamic_cast`
-rw-r--r-- | src/ARMJIT_Memory.cpp | 6 |
1 files 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<DSi*>(&NDS); - assert(dsi != nullptr); + if (NDS.ConsoleType == 0) + return; + + auto* dsi = static_cast<DSi*>(&NDS); for (int i = 0; i < Mappings[memregion_SharedWRAM].Length;) { Mapping& mapping = Mappings[memregion_SharedWRAM][i]; |