summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-29 13:50:17 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-29 13:50:17 +0200
commitb29321644b03df1b273d40c7d5895fa2ca329211 (patch)
treefe6cacee6b5d9b308b5500e20a5d2d727a5088f6 /src/ui
parent875675406a927acf23a26b3e74ef84d6543eec6e (diff)
TextBuf: Fixed garbage in the background
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/text.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index 7c39089d..4b3a5a10 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -1023,6 +1023,8 @@ void init_TextBuf(iTextBuf *d, int font, const char *text) {
1023 SDL_Texture *oldTarget = SDL_GetRenderTarget(render); 1023 SDL_Texture *oldTarget = SDL_GetRenderTarget(render);
1024 SDL_SetRenderTarget(render, d->texture); 1024 SDL_SetRenderTarget(render, d->texture);
1025 SDL_SetTextureBlendMode(text_.cache, SDL_BLENDMODE_NONE); /* blended when TextBuf is drawn */ 1025 SDL_SetTextureBlendMode(text_.cache, SDL_BLENDMODE_NONE); /* blended when TextBuf is drawn */
1026 SDL_SetRenderDrawColor(text_.render, 255, 255, 255, 0);
1027 SDL_RenderClear(text_.render);
1026 draw_Text_(font, zero_I2(), white_ColorId, range_CStr(text)); 1028 draw_Text_(font, zero_I2(), white_ColorId, range_CStr(text));
1027 SDL_SetTextureBlendMode(text_.cache, SDL_BLENDMODE_BLEND); 1029 SDL_SetTextureBlendMode(text_.cache, SDL_BLENDMODE_BLEND);
1028 SDL_SetRenderTarget(render, oldTarget); 1030 SDL_SetRenderTarget(render, oldTarget);