From cfaeb06c052a5fa54e78bc6da3059320adff26d2 Mon Sep 17 00:00:00 2001 From: mattmenke Date: Wed, 23 Sep 2009 04:37:15 +0000 Subject: [PATCH] LilyPad: Quick fix to bug in the thread stuff from last update. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1905 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/LilyPad/LilyPad.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/LilyPad/LilyPad.cpp b/plugins/LilyPad/LilyPad.cpp index e5b9572e15..3846b114e0 100644 --- a/plugins/LilyPad/LilyPad.cpp +++ b/plugins/LilyPad/LilyPad.cpp @@ -366,6 +366,9 @@ void CapSum(ButtonSum *sum) { // Only matters when GS thread updates is disabled (Just like summed pad values // for pads beyond the first slot). Also, it's set to 4 and decremented by 1 on each read, // so it's less likely I'll control state on a PADkeyEvent call. + +// Values, in order, correspond to PADkeyEvent, PADupdate(0), PADupdate(1), and +// WndProc(WMA_FORCE_UPDATE). Last is always 0. char padReadKeyUpdated[4] = {0, 0, 0, 0}; #define LOCK_DIRECTION 2 @@ -575,9 +578,8 @@ void Update(unsigned int port, unsigned int slot) { for (i=0; i<8; i++) { pads[i&1][i>>1].sum = s[i&1][i>>1]; } - pads[port][slot].stateUpdated--; padReadKeyUpdated[0] = padReadKeyUpdated[1] = padReadKeyUpdated[2] = 1; - *stateUpdated = 0; + stateUpdated[0]--; } void CALLBACK PADupdate(int port) {