diff --git a/src/i_video.h b/src/i_video.h index ee2875026..1a23c9c69 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -142,10 +142,6 @@ boolean I_UseNativeKeyboard(void); boolean I_CheckNativeRes(void); #ifdef USE_FBO_OGL -#if defined (__unix__) -extern boolean xwaylandcrap; -#endif - extern float InvSupersampleFactorX; extern float InvSupersampleFactorY; diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 6be5739e4..8493fb245 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -219,10 +219,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; float InvSupersampleFactorX = 0.0; @@ -285,9 +281,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); @@ -790,23 +783,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 f93ce8cde..59c94672b 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -71,15 +71,16 @@ PFNglGetString pglGetString; #endif #ifdef USE_FBO_OGL + #if defined (__unix__) -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 ); } @@ -189,8 +190,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 } @@ -304,6 +305,12 @@ void OglSdlFinishUpdate(boolean waitvbl) if (!I_CheckNativeRes()) #endif GL_DrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, realwidth, realheight, false); + +#if defined (__unix__) +#ifdef USE_FBO_OGL + xwaylandcrap = false; +#endif +#endif } #endif //HWRENDER