fix nvidia xwayland screentex issue in dumb way

josdifgjs09ef09
This commit is contained in:
Alug committed 2024-08-07 09:41:10 +02:00
1 parent 27074cb8d2
commit 05a0085e22
1 file changed
+18 -1
+18 -1
View File
@@ -217,6 +217,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen);
static void Impl_SetWindowIcon(void);
#ifdef USE_FBO_OGL
static void I_FixXwaylandNvidia(void);
boolean downsample = false;
void RefreshOGLSDLSurface(void)
{
@@ -277,6 +278,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen, SDL_bool
#ifdef HWRENDER
if (rendermode == render_opengl)
{
I_FixXwaylandNvidia();
OglSdlSurface(vid.width, vid.height);
}
#endif
@@ -751,7 +753,7 @@ static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which)
#ifdef USE_FBO_OGL
void I_DownSample(void)
{
if (!cv_grframebuffer.value || !(rendermode == render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it
if (!cv_grframebuffer.value || (rendermode != render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it
{
downsample = false;
return;
@@ -773,6 +775,21 @@ void I_DownSample(void)
else
downsample = false; // couldnt get display info so turn the thing off
}
static void I_FixXwaylandNvidia(void) //dumbass crap, fix ur shit nvidia
{
if (!cv_grframebuffer.value || (rendermode != render_opengl) || (!supportFBO)) //no sense to do this crap if we cant benefit from it
{
downsample = false;
return;
}
// enable fbo resize shit, update the ogl surface and turn crap back off lol
downsample = true;
RefreshOGLSDLSurface();
downsample = false;
RefreshOGLSDLSurface();
}
#endif
static void Impl_HandleWindowEvent(SDL_WindowEvent evt)