mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fixed a small threading issue introduced by r6933 causing savestates to always freeze, thanks to artart78 for pinpointing the issue.
Properly pause the core when saving/loading savestates, previously we used PowerPC::Pause() and Start() which only update the state but doesn't properly set m_StepEvent and caused random hangs. Fixed hang when creating a savestate while the game was paused or in Frame Advance mode, now the thing works (just remember to press play duh). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6992 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -170,7 +170,8 @@ static volatile struct
|
||||
int mode;
|
||||
} s_doStateArgs;
|
||||
|
||||
// Run from the GPU thread on X11, CPU thread on the rest
|
||||
// Depending on the threading mode (DC/SC) this can be called
|
||||
// from either the GPU thread or the CPU thread
|
||||
static void check_DoState() {
|
||||
if (Common::AtomicLoadAcquire(s_doStateRequested))
|
||||
{
|
||||
@ -194,7 +195,7 @@ static void check_DoState() {
|
||||
}
|
||||
}
|
||||
|
||||
// Run from the CPU thread
|
||||
// Run from the GUI thread
|
||||
void DoState(unsigned char **ptr, int mode)
|
||||
{
|
||||
s_doStateArgs.ptr = ptr;
|
||||
@ -207,7 +208,7 @@ void DoState(unsigned char **ptr, int mode)
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
check_DoState();
|
||||
check_DoState();
|
||||
}
|
||||
|
||||
void VideoFifo_CheckAsyncRequest()
|
||||
|
Reference in New Issue
Block a user