Skip to content

Commit

Permalink
Soften restrictions around ARMJIT_Memory::RemapNWRAM
Browse files Browse the repository at this point in the history
- If in NDS mode, return instead of `assert`ing
- Use `static_cast` and `ConsoleType` instead of `dynamic_cast`
  • Loading branch information
JesseTG authored and nadiaholmquist committed Dec 8, 2023
1 parent 1b7b510 commit 2a35af5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ARMJIT_Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 2a35af5

Please sign in to comment.