From b2c0910376657208acb325953fbb2dbd4957d5e1 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sun, 21 Apr 2013 19:00:22 +0000 Subject: [PATCH] zero - try this? --- libsnes/bsnes/snes/chip/hitachidsp/hitachidsp.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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(); } }