better nvidia xwayland workaround handling

what in the world was i thinking????
This commit is contained in:
Alug committed 2024-12-20 03:12:57 +01:00
1 parent 2034eedbe4
commit 5b46ae2eb9
3 files changed
+11 -31

No files matched your search

-3
View File
@@ -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);
-24
View File
@@ -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)
+11 -4
View File
@@ -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)