enforce the xwayland hack even if fbo cvar is disabled
we have a bunch of guards in it so dont think there will be a problem
This commit is contained in:
1 parent
aa4bf55574
commit
a197a85930
4 files changed
+37
-5
No files matched your search
@@ -140,6 +140,10 @@ UINT32 I_GetRefreshRate(void);
|
||||
boolean I_UseNativeKeyboard(void);
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
#if defined (__unix__)
|
||||
extern boolean xwaylandcrap;
|
||||
#endif
|
||||
|
||||
void RefreshOGLSDLSurface(void);
|
||||
void I_DownSample(void);
|
||||
extern boolean downsample;
|
||||
|
||||
+4
-3
@@ -219,6 +219,7 @@ 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)
|
||||
@@ -789,14 +790,14 @@ static void I_FixXwaylandNvidia(void) //dumbass crap, fix ur shit nvidia
|
||||
{
|
||||
if (!supportFBO)
|
||||
{
|
||||
downsample = false;
|
||||
xwaylandcrap = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// enable fbo resize shit, update the ogl surface and turn crap back off lol
|
||||
downsample = true;
|
||||
xwaylandcrap = true;
|
||||
RefreshOGLSDLSurface();
|
||||
downsample = false;
|
||||
xwaylandcrap = false;
|
||||
RefreshOGLSDLSurface();
|
||||
}
|
||||
#endif
|
||||
|
||||
+23
-2
@@ -68,6 +68,12 @@ PFNglGetIntegerv pglGetIntegerv;
|
||||
PFNglGetString pglGetString;
|
||||
#endif
|
||||
|
||||
#if defined (__unix__)
|
||||
#ifdef USE_FBO_OGL
|
||||
boolean isnvidiagpu = false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** \brief SDL video display surface
|
||||
*/
|
||||
INT32 oglflags = 0;
|
||||
@@ -166,6 +172,13 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
maximumAnisotropy = 1;
|
||||
|
||||
granisotropicmode_cons_t[1].value = maximumAnisotropy;
|
||||
|
||||
#if defined (__unix__)
|
||||
#ifdef USE_FBO_OGL
|
||||
if (strstr((const char*)gl_renderer, "NVIDIA"))
|
||||
isnvidiagpu = true;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
first_init = true;
|
||||
|
||||
@@ -199,7 +212,11 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
RenderToFramebuffer = FrameBufferEnabled;
|
||||
GLFramebuffer_Disable();
|
||||
|
||||
if (RenderToFramebuffer && downsample)
|
||||
if ((RenderToFramebuffer && downsample)
|
||||
#if defined (__unix__)
|
||||
|| (isnvidiagpu && xwaylandcrap)
|
||||
#endif
|
||||
)
|
||||
GLFramebuffer_Enable();
|
||||
#endif
|
||||
|
||||
@@ -245,7 +262,11 @@ void OglSdlFinishUpdate(boolean waitvbl)
|
||||
HWR_DrawScreenFinalTexture(sdlw, sdlh);
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
if (RenderToFramebuffer && downsample)
|
||||
if ((RenderToFramebuffer && downsample)
|
||||
#if defined (__unix__)
|
||||
|| (isnvidiagpu && xwaylandcrap)
|
||||
#endif
|
||||
)
|
||||
GLFramebuffer_Enable();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
|
||||
boolean OglSdlSurface(INT32 w, INT32 h);
|
||||
|
||||
#if defined (__unix__)
|
||||
#ifdef USE_FBO_OGL
|
||||
extern boolean isnvidiagpu;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void OglSdlFinishUpdate(boolean vidwait);
|
||||
|
||||
extern SDL_Renderer *renderer;
|
||||
|
||||
Reference in new issue
Block a user