From fb7cabcccf997da03711b2e3005d001ff807cb06 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 12 Feb 2013 01:06:11 -0800 Subject: [PATCH] Fix some missing GPUCommon state. --- GPU/GPUCommon.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 336d46b093..d41ab94ab2 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -142,6 +142,23 @@ void GPUCommon::PreExecuteOp(u32 op, u32 diff) { void GPUCommon::DoState(PointerWrap &p) { p.Do(dlIdGenerator); p.Do(dlQueue); + int currentID = currentList == NULL ? 0 : currentList->id; + p.Do(currentID); + if (currentID == 0) { + currentList = 0; + } else { + for (auto it = dlQueue.begin(), end = dlQueue.end(); it != end; ++it) { + if (it->id == currentID) { + currentList = &*it; + break; + } + } + } + p.Do(interruptRunning); + p.Do(prev); + p.Do(stack); + p.Do(stackptr); + p.Do(finished); p.DoMarker("GPUCommon"); }