From beb2672f4055a2253c64cdd7040a17bd2fcc3605 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 20 Mar 2014 02:26:02 -0500 Subject: [PATCH] sdl2: fix mode changing --- src/sdl2/i_video.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdl2/i_video.c b/src/sdl2/i_video.c index 3df42103e..97b9b6c20 100644 --- a/src/sdl2/i_video.c +++ b/src/sdl2/i_video.c @@ -177,6 +177,7 @@ static INT32 windowedModes[MAXWINMODES][2] = static void Impl_VideoSetupSDLBuffer(void); static void Impl_VideoSetupBuffer(void); static SDL_bool Impl_CreateWindow(SDL_bool fullscreen); +static void Impl_SetWindowName(const char *title); static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) { @@ -215,6 +216,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) } SDL_RenderSetLogicalSize(renderer, width, height); + //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); // Set up Texture realwidth = width; @@ -1544,10 +1546,12 @@ INT32 VID_SetMode(INT32 modeNum) { SDLdoUngrabMouse(); + vid.recalc = 1; vid.width = windowedModes[modeNum][0]; vid.height = windowedModes[modeNum][1]; vid.bpp = 1; + Impl_SetWindowName("SRB2 "VERSIONSTRING); vid.modenum = modeNum; //VID_GetModeForSize(vidSurface->w,vidSurface->h); SDLSetMode(windowedModes[modeNum][0], windowedModes[modeNum][1], USE_FULLSCREEN);