do not access NDS object emulation is paused

This commit is contained in:
RSDuck
2023-12-22 23:30:59 +01:00
parent 521fc249a3
commit 989b93c92a

View File

@ -592,6 +592,11 @@ void EmuThread::run()
if (Input::HotkeyPressed(HK_SwapScreens)) emit swapScreensToggle(); if (Input::HotkeyPressed(HK_SwapScreens)) emit swapScreensToggle();
if (Input::HotkeyPressed(HK_SwapScreenEmphasis)) emit screenEmphasisToggle(); if (Input::HotkeyPressed(HK_SwapScreenEmphasis)) emit screenEmphasisToggle();
if (EmuRunning == emuStatus_Running || EmuRunning == emuStatus_FrameStep)
{
EmuStatus = emuStatus_Running;
if (EmuRunning == emuStatus_FrameStep) EmuRunning = emuStatus_Paused;
if (Input::HotkeyPressed(HK_SolarSensorDecrease)) if (Input::HotkeyPressed(HK_SolarSensorDecrease))
{ {
int level = NDS->GBACartSlot.SetInput(GBACart::Input_SolarSensorDown, true); int level = NDS->GBACartSlot.SetInput(GBACart::Input_SolarSensorDown, true);
@ -650,11 +655,6 @@ void EmuThread::run()
dsi.I2C.GetBPTWL()->ProcessVolumeSwitchInput(currentTime); dsi.I2C.GetBPTWL()->ProcessVolumeSwitchInput(currentTime);
} }
if (EmuRunning == emuStatus_Running || EmuRunning == emuStatus_FrameStep)
{
EmuStatus = emuStatus_Running;
if (EmuRunning == emuStatus_FrameStep) EmuRunning = emuStatus_Paused;
// update render settings if needed // update render settings if needed
// HACK: // HACK:
// once the fast forward hotkey is released, we need to update vsync // once the fast forward hotkey is released, we need to update vsync