Add CoreTiming to save states.
I hope DoLinkedList works, seems like it should.
This commit is contained in:
parent
fbe4fd396e
commit
91d727a65a
3 changed files with 37 additions and 13 deletions
|
@ -55,15 +55,17 @@ namespace SaveState
|
|||
static std::vector<Operation> pending;
|
||||
static std::recursive_mutex mutex;
|
||||
|
||||
void Process(u64 userdata, int cyclesLate);
|
||||
|
||||
// This is where the magic happens.
|
||||
void SaveStart::DoState(PointerWrap &p)
|
||||
{
|
||||
// Gotta do CoreTiming first since we'll restore into it.
|
||||
// TODO CoreTiming
|
||||
CoreTiming::DoState(p);
|
||||
|
||||
// This save state even saves its own state.
|
||||
p.Do(timer);
|
||||
CoreTiming::RestoreEvent(timer, "SaveState", Process);
|
||||
CoreTiming::RestoreRegisterEvent(timer, "SaveState", Process);
|
||||
p.DoMarker("SaveState");
|
||||
|
||||
Memory::DoState(p);
|
||||
|
@ -71,8 +73,6 @@ namespace SaveState
|
|||
__KernelDoState(p);
|
||||
}
|
||||
|
||||
void Process(u64 userdata, int cyclesLate);
|
||||
|
||||
void Enqueue(SaveState::Operation op)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue