From 10cf251b463f81c4f9e3bea13b9370f869a9fbca 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 35ed51d02..e2577bc69 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -170,6 +170,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 a102a3028..f3fef167d 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -220,7 +220,6 @@ boolean downsample = false; #ifdef HWRENDER void RefreshSDLSurface(void) { - I_DownSample(); OglSdlSurface(vid.width, vid.height); } #endif @@ -755,8 +754,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