From: divverent Date: Sat, 4 Oct 2014 20:20:22 +0000 (+0000) Subject: If vid_desktopfullscreen is set, manually initialize window with the current desktop... X-Git-Tag: xonotic-v0.8.0~38 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=06c10ad2a0938eea375ff0976f0386bb51d10c1d;p=xonotic%2Fdarkplaces.git If vid_desktopfullscreen is set, manually initialize window with the current desktop resolution instead of with the default values and then letting sdl correct it automatically when they differ. It caused issues switching from fullscreen to window mode in the first game run Signed-off-by: terencehill git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12098 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=c0eb3105f4f3c4daf3f2025246c516a8195686b7 --- diff --git a/vid_sdl.c b/vid_sdl.c index ba5a6fd7..4637f47d 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -2506,7 +2506,12 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode) { if (mode->fullscreen) { if (vid_desktopfullscreen.integer) + { + vid_mode_t *m = VID_GetDesktopMode(); + mode->width = m->width; + mode->height = m->height; windowflags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + } else windowflags |= SDL_WINDOW_FULLSCREEN; vid_isfullscreen = true;