]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
SDL1 desktopfullscreen too (crappy hack, should work)
authorRudolf Polzer <divverent@xonotic.org>
Tue, 20 Aug 2013 08:51:21 +0000 (10:51 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 20 Aug 2013 08:51:21 +0000 (10:51 +0200)
vid_sdl.c

index 6d200f2263f38c9cd2063ed00bc3b5efb65f0c46..9fff961384005f85c53818c1a6a25c1f7214a9c7 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -2476,6 +2476,10 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode)
        vid_isfullscreen = false;
        if (mode->fullscreen) {
 #if SDL_MAJOR_VERSION == 1
+               SDL_VideoInfo *vi = SDL_GetVideoInfo();
+               mode->width = vi->current_w;
+               mode->height = vi->current_h;
+               mode->bitsperpixel = vi->vfmt->BitsPerPixel;
                flags |= SDL_FULLSCREEN;
 #else
                if (vid_desktopfullscreen.integer)
@@ -2623,6 +2627,10 @@ static qboolean VID_InitModeSoft(viddef_mode_t *mode)
        vid_isfullscreen = false;
        if (mode->fullscreen) {
 #if SDL_MAJOR_VERSION == 1
+               SDL_VideoInfo *vi = SDL_GetVideoInfo();
+               mode->width = vi->current_w;
+               mode->height = vi->current_h;
+               mode->bitsperpixel = vi->vfmt->BitsPerPixel;
                flags |= SDL_FULLSCREEN;
 #else
                if (vid_desktopfullscreen.integer)