EmuInstance: check consoleType from NDS rather than the instance's when

updating console, fixes crash on console type switch

EmuInstance::consoleType is already updated, so the check for whether we
should recreate the NDS to switch console type never succeeds.
This commit is contained in:
Nadia Holmquist Pedersen 2024-07-02 06:23:21 +02:00
parent db20771ef3
commit f2611680ca
1 changed files with 1 additions and 1 deletions

View File

@ -1172,7 +1172,7 @@ bool EmuInstance::updateConsole(UpdateConsoleNDSArgs&& _ndsargs, UpdateConsoleGB
} }
if ((!nds) || (consoletype != consoleType)) if ((!nds) || (consoletype != nds->ConsoleType))
{ {
NDS::Current = nullptr; NDS::Current = nullptr;
if (nds) delete nds; if (nds) delete nds;