From c0eb3105f4f3c4daf3f2025246c516a8195686b7 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 4 Oct 2014 20:20:22 +0000 Subject: [PATCH] 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 --- vid_sdl.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.2