just query this once

This commit is contained in:
Alug committed 2024-12-20 00:57:15 +01:00
1 parent 2083daf4c3
commit 11cc7e63b7
1 file changed
+6 -4
+6 -4
View File
@@ -260,6 +260,9 @@ void OglSdlFinishUpdate(boolean waitvbl)
{
static boolean oldwaitvbl = false;
int sdlw, sdlh;
const boolean usefbo = UseScreenFBO();
if (oldwaitvbl != waitvbl)
{
if (waitvbl)
@@ -279,18 +282,17 @@ void OglSdlFinishUpdate(boolean waitvbl)
HWR_MakeScreenFinalTexture();
#ifdef USE_FBO_OGL
if (UseScreenFBO())
if (usefbo)
{
GL_Framebuffer_Unbind();
fbo_shader = HWR_UseShader() && !WipeInAction; // this looks awful with wipes
fbo_shader = (HWR_UseShader() && !WipeInAction); // this looks awful with wipes
}
#endif
//HWR_DrawScreenFinalTexture(sdlw, sdlh);
GL_DrawScreenFinalTexture(HWD_SCREENTEXTURE_GENERIC2, sdlw, sdlh, (HWR_ShouldUsePaletteRendering() || fbo_shader));
#ifdef USE_FBO_OGL
if (UseScreenFBO())
if (usefbo)
{
GL_Framebuffer_Enable();
}