From 9e7e4d5fe703c51add68ac2d08bde1b7b5267efb Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 27 Mar 2024 12:11:45 +0100 Subject: [PATCH] testing smth yes -1 is valid for this sometimes --- src/sdl/i_video.c | 6 ------ src/sdl/ogl_sdl.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 6904769c0..cbecc1fee 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -2429,12 +2429,6 @@ static void Impl_SetVsync(void) SDL_RenderSetVSync(renderer, cv_vidwait.value ? 1 : 0); #endif } -#ifdef HWRENDER - else if (rendermode == render_opengl && sdlglcontext != NULL && SDL_GL_GetCurrentContext() == sdlglcontext) - { - SDL_GL_SetSwapInterval(cv_vidwait.value ? 1 : 0); - } -#endif } #endif diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 7ffae65e2..a5a1ddb41 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -163,7 +163,7 @@ boolean OglSdlSurface(INT32 w, INT32 h) granisotropicmode_cons_t[1].value = maximumAnisotropy; - SDL_GL_SetSwapInterval(cv_vidwait.value ? 1 : 0); + SDL_GL_SetSwapInterval(cv_vidwait.value ? -1 : 0); // The screen textures need to be flushed if the width or height change so that they be remade for the correct size if (screen_width != w || screen_height != h) @@ -203,7 +203,7 @@ void OglSdlFinishUpdate(boolean waitvbl) int sdlw, sdlh; if (oldwaitvbl != waitvbl) { - SDL_GL_SetSwapInterval(waitvbl ? 1 : 0); + SDL_GL_SetSwapInterval(waitvbl ? -1 : 0); } oldwaitvbl = waitvbl;