diff --git a/src/i_video.h b/src/i_video.h index 76055a6aa..70321d138 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -142,9 +142,6 @@ boolean I_UseNativeKeyboard(void); boolean I_CheckNativeRes(void); #ifdef USE_FBO_OGL -#if defined (__unix__) -extern boolean xwaylandcrap; -#endif void RefreshOGLSDLSurface(void); void I_DownSample(void); diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 9b8790795..524be7885 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -217,10 +217,6 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen); static void Impl_SetWindowIcon(void); #ifdef USE_FBO_OGL -#if defined (__unix__) -static void I_FixXwaylandNvidia(void); -boolean xwaylandcrap = false; -#endif boolean downsample = false; void RefreshOGLSDLSurface(void) { @@ -279,9 +275,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) if (rendermode == render_opengl) { #ifdef USE_FBO_OGL -#if defined (__unix__) - I_FixXwaylandNvidia(); -#endif I_DownSample(); #endif OglSdlSurface(vid.width, vid.height); @@ -781,23 +774,6 @@ void I_DownSample(void) } } } - -#if defined (__unix__) -static void I_FixXwaylandNvidia(void) //dumbass crap, fix ur shit nvidia -{ - if (!supportFBO) - { - xwaylandcrap = false; - return; - } - - // enable fbo resize shit, update the ogl surface and turn crap back off lol - xwaylandcrap = true; - RefreshOGLSDLSurface(); - xwaylandcrap = false; - RefreshOGLSDLSurface(); -} -#endif #endif static void Impl_HandleWindowEvent(SDL_WindowEvent evt) diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 710986e77..a509857f6 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -69,15 +69,16 @@ PFNglGetString pglGetString; #endif #ifdef USE_FBO_OGL + #if defined (__unix__) -static boolean isnvidiagpu = false; +static boolean xwaylandcrap = false; #endif boolean UseScreenFBO(void) { return ((supportFBO && cv_glframebuffer.value && downsample) #if defined (__unix__) - || (supportFBO && isnvidiagpu && xwaylandcrap) + || (supportFBO && xwaylandcrap) #endif ); } @@ -187,8 +188,8 @@ boolean OglSdlSurface(INT32 w, INT32 h) #if defined (__unix__) #ifdef USE_FBO_OGL - if (strstr((const char*)gl_renderer, "NVIDIA")) - isnvidiagpu = true; + if (supportFBO && strstr((const char*)gl_renderer, "NVIDIA")) + xwaylandcrap = true; #endif #endif } @@ -280,6 +281,12 @@ void OglSdlFinishUpdate(boolean waitvbl) if (!I_CheckNativeRes()) #endif HWR_DrawScreenFinalTexture(realwidth, realheight, false); + +#if defined (__unix__) +#ifdef USE_FBO_OGL + xwaylandcrap = false; +#endif +#endif } EXPORT void HWRAPI(OglSdlSetPalette) (RGBA_t *palette)