From 407bd39d8b31a9598b75dd1ab2fd08c6697f2fe5 Mon Sep 17 00:00:00 2001 From: "memberTwo.mb2" Date: Sun, 5 Oct 2008 11:52:44 +0000 Subject: [PATCH] fix savestates in SC mode at least git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@779 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/Fifo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 09517d4da8..2313c2a93b 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -35,7 +35,9 @@ void Fifo_DoState(PointerWrap &p) { p.DoArray(videoBuffer, FIFO_SIZE); p.Do(size); - // TODO : savestate of the old readptr equivalent + int pos = (int)(g_pVideoData-videoBuffer); // get offset + p.Do(pos); // read or write offset (depends on the mode afaik) + g_pVideoData = &videoBuffer[pos]; // overwrite g_pVideoData -> expected no change when load ss and change when save ss } void Fifo_Init()