Paused the video thread while a save state was being created or loaded. Performed the save state operation after the fifo became idle. Saved the interrupt status of the video thread into the save state. This helps stabilise the save states in dual core mode in games like Super Mario Galaxy.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7112 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau
2011-02-08 10:37:47 +00:00
parent 90bae5d57f
commit 855f97841d
9 changed files with 52 additions and 27 deletions

View File

@ -88,6 +88,8 @@ void DoState(PointerWrap &p)
return;
}
// Begin with video plugin, so that it gets a chance to clear it's caches and writeback modified things to RAM
// Pause the video thread in multi-threaded mode
g_video_backend->RunLoop(false);
g_video_backend->DoState(p);
if (Core::g_CoreStartupParameter.bWii)
@ -96,6 +98,9 @@ void DoState(PointerWrap &p)
PowerPC::DoState(p);
HW::DoState(p);
CoreTiming::DoState(p);
// Resume the video thread
g_video_backend->RunLoop(true);
}
void LoadBufferStateCallback(u64 userdata, int cyclesLate)