From 371404f3937df991319f9ed884cfd9748fd12c15 Mon Sep 17 00:00:00 2001 From: AllyTally Date: Sun, 19 Mar 2023 13:16:22 -0300 Subject: [PATCH] Fix textboxes fully fading out during blackout When `blackout` is active, the screen (to simplify) stops getting drawn to. The excecption is textboxes, which draw anyway. But since the screen isn't being cleared, removed textboxes stay on screen, since that texture isn't being cleared. In the SDL_Renderer PR, I accidentally broke this behavior, so this commit fixes it. Fixes #951. --- desktop_version/src/Render.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 9b512d24..b5902212 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1967,11 +1967,12 @@ void gamerender(void) graphics.cutscenebars(); graphics.drawfade(); + graphics.drawgui(); + graphics.set_render_target(graphics.gameTexture); graphics.copy_texture(graphics.gameplayTexture, NULL, NULL); - graphics.drawgui(); if (graphics.flipmode) { if (game.advancetext) font::print(PR_CEN | PR_BOR, -1, 228, loc::gettext("- Press ACTION to advance text -"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));