diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-06-25 18:16:17 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-06-25 18:16:17 -0400 |
commit | 6c3f3066945ae49c612d3a52e6496b26a9d55193 (patch) | |
tree | 617396369c5d6089d5b7fcb54b147df23339959d /2d | |
parent | 4048b6bf6ceac02c0b1e8c787317070a3fffa2a7 (diff) |
Apply SDL:enum->number on keysyms.
Diffstat (limited to '2d')
-rw-r--r-- | 2d/game-loop.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/2d/game-loop.scm b/2d/game-loop.scm index f2faf13..92d3796 100644 --- a/2d/game-loop.scm +++ b/2d/game-loop.scm @@ -73,9 +73,12 @@ "Calls the relevant callback for the event." (case (SDL:event:type e) ((SDL_KEYDOWN) - (key-down-callback (SDL:event:key:keysym:sym e))) + (key-down-callback (event-keycode e))) ((SDL_KEYUP) - (key-up-callback (SDL:event:key:keysym:sym e))))) + (key-up-callback (event-keycode e))))) + +(define (event-keycode e) + (SDL:enum->number SDL:event-keys (SDL:event:key:keysym:sym e))) ;;; ;;; Update and Render |