feat(input): KeyBind will now longer respond to repeat keys
This commit is contained in:
parent
eb871a9d5f
commit
14877b0a28
|
@ -16,7 +16,8 @@ KeyBind* keybind_new(SDL_Scancode key) {
|
|||
int keybind_is_changed_by(KeyBind* self, SDL_Event event) {
|
||||
return self->device->type == InputDevice_KBM
|
||||
&& (event.type == SDL_KEYUP || event.type == SDL_KEYDOWN)
|
||||
&& event.key.keysym.scancode == self->scancode;
|
||||
&& event.key.keysym.scancode == self->scancode
|
||||
&& event.key.repeat == 0;
|
||||
}
|
||||
|
||||
InputEvent keybind_evaluate(KeyBind* self, SDL_Event event) {
|
||||
|
|
Loading…
Reference in a new issue