diff options
-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 |