mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-24 00:25:23 +02:00
heck again
This commit is contained in:
parent
651dbe5ad7
commit
2acf505156
1 changed files with 9 additions and 7 deletions
|
@ -563,12 +563,14 @@ struct InputPrivate
|
|||
b.pressed = rawStates[scancode];
|
||||
b.triggered = (rawStates[scancode] && !rawStatesOld[scancode]);
|
||||
|
||||
bool repeated;
|
||||
if (rgssVer >= 2)
|
||||
repeated = rawRepeatCount >= 23 && ((rawRepeatCount+1) % 6) == 0;
|
||||
else
|
||||
repeated = rawRepeatCount >= 15 && ((rawRepeatCount+1) % 4) == 0;
|
||||
|
||||
bool repeated = false;
|
||||
if (scancode == rawRepeating)
|
||||
{
|
||||
if (rgssVer >= 2)
|
||||
repeated = rawRepeatCount >= 23 && ((rawRepeatCount+1) % 6) == 0;
|
||||
else
|
||||
repeated = rawRepeatCount >= 15 && ((rawRepeatCount+1) % 4) == 0;
|
||||
}
|
||||
b.repeated = repeated;
|
||||
|
||||
return b;
|
||||
|
@ -749,7 +751,7 @@ struct InputPrivate
|
|||
{
|
||||
memcpy(rawStates, shState->eThread().keyStates, SDL_NUM_SCANCODES);
|
||||
|
||||
for (int i = 1; i < 255; i++)
|
||||
for (int i = 0; i < SDL_NUM_SCANCODES; i++)
|
||||
{
|
||||
if (rawStates[i] && rawStatesOld[i])
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue