- (SDL_GL_SetAttribute SDL_GL_DOUBLEBUFFER 1)
- (set! flags (+ SDL_OPENGL SDL_GL_DOUBLEBUFFER SDL_HWPALETTE SDL_RESIZABLE
- (if (= (assoc-ref (SDL_GetVideoInfo) 'hw_available) 0) SDL_SWSURFACE SDL_HWSURFACE)
- (if (= (assoc-ref (SDL_GetVideoInfo) 'blit_hw) 0) 0 SDL_HWACCEL)))
- (set! screen (SDL_SetVideoMode width height bpp flags))
- (init-GL)
- (resize-screen-GL width height)
- (set! current-width width)
- (set! current-height height)
- (set! current-bpp bpp))
+ (let* ((props (get-game-properties))
+ (width (assoc-ref props 'width)) (height (assoc-ref props 'height))
+ (bpp (assoc-ref props 'bpp)) (title (assoc-ref props 'title))
+ (mode (assoc-ref props 'mode))
+ (info (SDL_GetVideoInfo)))
+ (SDL_GL_SetAttribute SDL_GL_DOUBLEBUFFER 1)
+ (set! flags (+ SDL_OPENGL SDL_GL_DOUBLEBUFFER SDL_HWPALETTE SDL_RESIZABLE
+ (if (= (assoc-ref info 'hw_available) 0) SDL_SWSURFACE SDL_HWSURFACE)
+ (if (= (assoc-ref info 'blit_hw) 0) 0 SDL_HWACCEL)))
+ (set! screen (SDL_SetVideoMode width height bpp flags))
+ (SDL_WM_SetCaption title "")
+ (init-gl)
+ (if (eq? mode '3d) (set-3d-mode) (set-2d-mode))))