diff --git a/libsnes/bsnes/snes/chip/hitachidsp/hitachidsp.cpp b/libsnes/bsnes/snes/chip/hitachidsp/hitachidsp.cpp index 1042267e53..4994603c83 100644 --- a/libsnes/bsnes/snes/chip/hitachidsp/hitachidsp.cpp +++ b/libsnes/bsnes/snes/chip/hitachidsp/hitachidsp.cpp @@ -12,10 +12,14 @@ HitachiDSP hitachidsp; void HitachiDSP::Enter() { hitachidsp.enter(); } void HitachiDSP::enter() { - while(true) { + while(true) { + // exit requested due to savestate if(scheduler.sync == Scheduler::SynchronizeMode::All) { scheduler.exit(Scheduler::ExitReason::SynchronizeEvent); - } + } + + // if we bail out due to savestating, the first thing we'll try afterwards is synchronize_cpu() again + synchronize_cpu(); switch(state) { case State::Idle: @@ -37,8 +41,9 @@ void HitachiDSP::enter() { step(1); break; } - - synchronize_cpu(); + + // this call is gone, but it's the first thing we try at the top of the loop AFTER we bail out + //synchronize_cpu(); } }