fix input
This commit is contained in:
parent
49398698b5
commit
9486d8154c
|
@ -57,6 +57,7 @@ static bool sdl_key_pressed(int key)
|
||||||
|
|
||||||
int num_keys = 0xFFFF;
|
int num_keys = 0xFFFF;
|
||||||
Uint8 *keymap = SDL_GetKeyState(&num_keys);
|
Uint8 *keymap = SDL_GetKeyState(&num_keys);
|
||||||
|
if (sym < 0 || sym >= num_keys)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return keymap[sym];
|
return keymap[sym];
|
||||||
|
|
Loading…
Reference in New Issue