Don't use key repeat.
This commit is contained in:
parent
26aa3b3bb1
commit
db8678d64b
|
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
if (event.key.keysym.scancode >= 0 && event.key.keysym.scancode < MAX_KEYBOARD_KEYS)
|
if (event.key.keysym.scancode >= 0 && event.key.keysym.scancode < MAX_KEYBOARD_KEYS && event.key.repeat == 0)
|
||||||
{
|
{
|
||||||
app.keyboard[event.key.keysym.scancode] = 1;
|
app.keyboard[event.key.keysym.scancode] = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue