* Another bugfix.
This commit is contained in:
jean.chalard
2008-11-28 15:13:54 +00:00
parent eef151cac5
commit 4196103a03
+4 -3
View File
@@ -364,8 +364,8 @@ u8 JGE::GetAnalogY()
return mCtrlPad.Ly; return mCtrlPad.Ly;
} }
#define REPEAT_DELAY 1 #define REPEAT_DELAY 0.5
#define REPEAT_FREQUENCY 60 #define REPEAT_FREQUENCY 5
void JGE::Run() void JGE::Run()
{ {
u64 curr; u64 curr;
@@ -392,13 +392,14 @@ void JGE::Run()
{ {
if (!(gHolds & gKeyCodeList[i])) gKeyBuffer.push(gKeyCodeList[i]); if (!(gHolds & gKeyCodeList[i])) gKeyBuffer.push(gKeyCodeList[i]);
nextInput = repeatDelay; nextInput = repeatDelay;
gHolds |= gKeyCodeList[i];
} }
else if (nextInput < 0) else if (nextInput < 0)
{ {
if (!(gHolds & gKeyCodeList[i])) gKeyBuffer.push(gKeyCodeList[i]); if (!(gHolds & gKeyCodeList[i])) gKeyBuffer.push(gKeyCodeList[i]);
nextInput = repeatPeriod; nextInput = repeatPeriod;
gHolds |= gKeyCodeList[i];
} }
gHolds |= gKeyCodeList[i];
} }
if (!(gKeyCodeList[i] & mCtrlPad.Buttons)) if (!(gKeyCodeList[i] & mCtrlPad.Buttons))
if (gKeyCodeList[i] & mOldButtons) if (gKeyCodeList[i] & mOldButtons)