diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-11 11:40:54 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-11 11:40:54 +0200 |
commit | d6fba6717e707b7f66b83b21664c398a4aa5dda1 (patch) | |
tree | 428ecd00de83540ffaa8a34b57b6fce23b6b2f60 /src/ui/text.c | |
parent | 89c9f76781fca5b96081e748bea87ccfa376c0d7 (diff) |
Window: Create hidden to avoid shuffling position during launch
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 3d208b68..04bb17a2 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -488,11 +488,11 @@ static void cache_Font_(iFont *d, iGlyph *glyph, int hoff) { | |||
488 | SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_NONE); | 488 | SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_NONE); |
489 | glRect->size = init_I2(surface->w, surface->h); | 489 | glRect->size = init_I2(surface->w, surface->h); |
490 | } | 490 | } |
491 | /* Determine placement in the glyph cache texture, advancing in rows. */ | ||
492 | glRect->pos = assignCachePos_Text_(txt, glRect->size); | ||
493 | const SDL_Rect dstRect = sdlRect_(*glRect); | ||
494 | SDL_RenderCopy(render, tex, &(SDL_Rect){ 0, 0, dstRect.w, dstRect.h }, &dstRect); | ||
495 | if (tex) { | 491 | if (tex) { |
492 | /* Determine placement in the glyph cache texture, advancing in rows. */ | ||
493 | glRect->pos = assignCachePos_Text_(txt, glRect->size); | ||
494 | const SDL_Rect dstRect = sdlRect_(*glRect); | ||
495 | SDL_RenderCopy(render, tex, &(SDL_Rect){ 0, 0, dstRect.w, dstRect.h }, &dstRect); | ||
496 | SDL_DestroyTexture(tex); | 496 | SDL_DestroyTexture(tex); |
497 | iAssert(surface); | 497 | iAssert(surface); |
498 | SDL_FreeSurface(surface); | 498 | SDL_FreeSurface(surface); |