diff options
-rw-r--r-- | sly/window.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sly/window.scm b/sly/window.scm index 934ef5f..aa3653a 100644 --- a/sly/window.scm +++ b/sly/window.scm @@ -63,9 +63,11 @@ (register-event-handler 'video-resize (lambda (e) - (run-hook window-resize-hook - (SDL:event:resize:w e) - (SDL:event:resize:h e)))) + (let ((width (SDL:event:resize:w e)) + (height (SDL:event:resize:h e))) + ;; Reset video mode. + (SDL:set-video-mode width height 24 '(opengl)) + (run-hook window-resize-hook width height)))) (define-signal window-size (hook->signal window-resize-hook |