better nvidia xwayland workaround handling
what in the world was i thinking????
This commit is contained in:
1 parent
a2e6ec4f5b
commit
2cbc4e580d
3 files changed
+11
-32
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
+11
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user