From 0c3be639c5b29139f81409f31e5c4cdd3fa5c2d4 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 26 Nov 2019 02:47:48 +0300 Subject: [PATCH] engine: reliably tell client.dll about vid mode changes --- engine/client/vid_common.c | 2 ++ engine/platform/sdl/events.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/client/vid_common.c b/engine/client/vid_common.c index f31312dd..fb1837ca 100644 --- a/engine/client/vid_common.c +++ b/engine/client/vid_common.c @@ -83,6 +83,8 @@ void R_SaveVideoMode( int w, int h , int render_w, int render_h ) if( render_w * 3 != render_h * 4 && render_w * 4 != render_h * 5 ) refState.wideScreen = true; else refState.wideScreen = false; + + SCR_VidInit(); // tell client.dll that vid_mode has changed } /* diff --git a/engine/platform/sdl/events.c b/engine/platform/sdl/events.c index ee8e5ebc..7e73ba49 100644 --- a/engine/platform/sdl/events.c +++ b/engine/platform/sdl/events.c @@ -572,7 +572,6 @@ static void SDLash_EventFilter( SDL_Event *event ) break; VID_SaveWindowSize( event->window.data1, event->window.data2 ); - SCR_VidInit(); // tell the client.dll that vid_mode has changed break; } default: @@ -581,8 +580,7 @@ static void SDLash_EventFilter( SDL_Event *event ) #else case SDL_VIDEORESIZE: VID_SaveWindowSize( event->resize.w, event->resize.h ); - SCR_VidInit(); - break; // tell the client.dll that vid_mode has changed + break; case SDL_ACTIVEEVENT: SDLash_ActiveEvent( event->active.gain ); break;