From 1391e556d6e3c0e34f512d75744780812968542e Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 10 Apr 2024 17:40:35 +0200 Subject: [PATCH] that wasnt the onchange im sleepy --- src/hardware/hw_main.c | 1 + src/sdl/i_video.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 3634d1e9d..b9b9ba6be 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -168,6 +168,7 @@ static void CV_grframebuffer_OnChange(void) { ONLY_IF_GL_LOADED HWD.pfnSetSpecialState(HWD_SET_FRAMEBUFFER, cv_grframebuffer.value); + I_DownSample(); RefreshSDLSurface(); } diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 8a0ca0e51..62073fe78 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -208,7 +208,6 @@ boolean downsample = false; #ifdef HWRENDER void RefreshSDLSurface(void) { - I_DownSample(); OglSdlSurface(vid.width, vid.height); } #endif @@ -781,8 +780,8 @@ void I_DownSample(void) } int currentDisplayIndex = SDL_GetWindowDisplayIndex(window); - SDL_DisplayMode curmode; + if (SDL_GetCurrentDisplayMode(currentDisplayIndex, &curmode) == 0) { if (cv_grframebuffer.value && ((vid.width > curmode.w) || (vid.height > curmode.h))) //framebuffer downsampler thinge