diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 573518829..fde5672e1 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -217,6 +217,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen); static void Impl_SetWindowIcon(void); #ifdef USE_FBO_OGL +static void I_FixXwaylandNvidia(void); boolean downsample = false; void RefreshOGLSDLSurface(void) { @@ -277,6 +278,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen, SDL_bool #ifdef HWRENDER if (rendermode == render_opengl) { + I_FixXwaylandNvidia(); OglSdlSurface(vid.width, vid.height); } #endif @@ -751,7 +753,7 @@ static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which) #ifdef USE_FBO_OGL void I_DownSample(void) { - if (!cv_grframebuffer.value || !(rendermode == render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it + if (!cv_grframebuffer.value || (rendermode != render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it { downsample = false; return; @@ -773,6 +775,21 @@ void I_DownSample(void) else downsample = false; // couldnt get display info so turn the thing off } + +static void I_FixXwaylandNvidia(void) //dumbass crap, fix ur shit nvidia +{ + if (!cv_grframebuffer.value || (rendermode != render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it + { + downsample = false; + return; + } + + // enable fbo resize shit, update the ogl surface and turn crap back off lol + downsample = true; + RefreshOGLSDLSurface(); + downsample = false; + RefreshOGLSDLSurface(); +} #endif static void Impl_HandleWindowEvent(SDL_WindowEvent evt)