Soften restrictions around `ARMJIT_Memory::RemapNWRAM`

- If in NDS mode, return instead of `assert`ing
- Use `static_cast` and `ConsoleType` instead of `dynamic_cast`
This commit is contained in:
Jesse Talavera-Greenberg 2023-12-06 09:10:30 -05:00 committed by Nadia Holmquist Pedersen
parent 1b7b5106e2
commit 2a35af5bb9
1 changed files with 4 additions and 2 deletions

View File

@ -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];