diff options
-rw-r--r-- | src/ui/text.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index a592a97a..7c39089d 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -1020,11 +1020,13 @@ void init_TextBuf(iTextBuf *d, int font, const char *text) { | |||
1020 | SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, | 1020 | SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, |
1021 | d->size.x, | 1021 | d->size.x, |
1022 | d->size.y); | 1022 | d->size.y); |
1023 | SDL_SetTextureBlendMode(d->texture, SDL_BLENDMODE_BLEND); | ||
1024 | SDL_Texture *oldTarget = SDL_GetRenderTarget(render); | 1023 | SDL_Texture *oldTarget = SDL_GetRenderTarget(render); |
1025 | SDL_SetRenderTarget(render, d->texture); | 1024 | SDL_SetRenderTarget(render, d->texture); |
1025 | SDL_SetTextureBlendMode(text_.cache, SDL_BLENDMODE_NONE); /* blended when TextBuf is drawn */ | ||
1026 | draw_Text_(font, zero_I2(), white_ColorId, range_CStr(text)); | 1026 | draw_Text_(font, zero_I2(), white_ColorId, range_CStr(text)); |
1027 | SDL_SetTextureBlendMode(text_.cache, SDL_BLENDMODE_BLEND); | ||
1027 | SDL_SetRenderTarget(render, oldTarget); | 1028 | SDL_SetRenderTarget(render, oldTarget); |
1029 | SDL_SetTextureBlendMode(d->texture, SDL_BLENDMODE_BLEND); | ||
1028 | } | 1030 | } |
1029 | 1031 | ||
1030 | void deinit_TextBuf(iTextBuf *d) { | 1032 | void deinit_TextBuf(iTextBuf *d) { |