summaryrefslogtreecommitdiff
path: root/sdl2
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2017-01-01 15:10:02 -0500
committerDavid Thompson <dthompson2@worcester.edu>2017-01-01 15:12:07 -0500
commit15ee89a01eb02c988814df861544a6de86232de2 (patch)
tree5572164a0fb792c6eaf90a04af44294537f14a7b /sdl2
parentdf92c684529be16052b66775a9be6744ed6c3beb (diff)
events: Parse the "repeat" field of a keyboard event as a boolean.
* sdl2/events.scm (<keyboard-event>): Rename "repeat" field to "repeat?" (keyboard-event-repeat): Replace with... (keyboard-event-repeat?): ... this. (parse-keyboard-event): Parse "repeat" field as a boolean.
Diffstat (limited to 'sdl2')
-rw-r--r--sdl2/events.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/sdl2/events.scm b/sdl2/events.scm
index 2c303c7..8204b34 100644
--- a/sdl2/events.scm
+++ b/sdl2/events.scm
@@ -65,7 +65,7 @@
keyboard-event-timestamp
keyboard-event-window-id
keyboard-event-pressed?
- keyboard-event-repeat
+ keyboard-event-repeat?
keyboard-event-key
keyboard-event-scancode
keyboard-event-modifiers
@@ -308,13 +308,13 @@
;;;
(define-record-type <keyboard-event>
- (make-keyboard-event timestamp window-id pressed? repeat
+ (make-keyboard-event timestamp window-id pressed? repeat?
key scancode modifiers)
keyboard-event?
(timestamp keyboard-event-timestamp)
(window-id keyboard-event-window-id)
(pressed? keyboard-event-pressed?)
- (repeat keyboard-event-repeat)
+ (repeat? keyboard-event-repeat?)
(key keyboard-event-key)
(scancode keyboard-event-scancode)
(modifiers keyboard-event-modifiers))
@@ -857,7 +857,7 @@
(make-keyboard-event timestamp
window-id
(= state ffi:SDL_PRESSED)
- repeat
+ (not (zero? repeat))
(keycode->symbol sym)
(scancode->symbol scancode)
(mod->list mod)))))