From 7cff309cf7c9008cb51f6d7797b8c4c78c0ed5d1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 19 Nov 2013 18:33:17 -0800 Subject: [PATCH] Ignore the current button state in savestates. Fixes #4149. --- Core/HLE/sceCtrl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceCtrl.cpp b/Core/HLE/sceCtrl.cpp index 5e2051b37..ad99f5f64 100644 --- a/Core/HLE/sceCtrl.cpp +++ b/Core/HLE/sceCtrl.cpp @@ -323,7 +323,7 @@ void __CtrlDoState(PointerWrap &p) { std::lock_guard guard(ctrlMutex); - auto s = p.Section("sceCtrl", 1, 2); + auto s = p.Section("sceCtrl", 1, 3); if (!s) return; @@ -332,7 +332,10 @@ void __CtrlDoState(PointerWrap &p) p.Do(ctrlOldButtons); p.DoVoid(ctrlBufs, sizeof(ctrlBufs)); - p.Do(ctrlCurrent); + if (s <= 2) { + _ctrl_data dummy = {0}; + p.Do(dummy); + } p.Do(ctrlBuf); p.Do(ctrlBufRead); p.Do(latch);