From 604bd351b96f8d0a0ebee7aa6460a7c37260d119 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sun, 8 Mar 2026 09:53:40 -0700 Subject: Clean up --- src/render.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/render.c b/src/render.c index b1fd3e8..f716e1a 100644 --- a/src/render.c +++ b/src/render.c @@ -125,12 +125,12 @@ static void RenderGlyph( for (int x = 0; (x < atlas->header.glyph_width) && PenInSurface(state, glyph_width - 1, glyph_height - 1); ++x, ++glyph) { - uiPixel* pixel = PixelXy(state, x, y); if (*glyph > 0) { - pixel->r = *glyph; - pixel->g = *glyph; - pixel->b = *glyph; - pixel->a = 255; + uiPixel* pixel = PixelXy(state, x, y); + pixel->r = *glyph; + pixel->g = *glyph; + pixel->b = *glyph; + pixel->a = 255; } } } @@ -292,14 +292,12 @@ void uiRender(const uiFrame* frame, uiSurface* surface) { RenderWidget( &(RenderState){ - .surface = *surface, - .subsurface = - (uiRect){ - .x = 0, - .y = 0, - .width = surface->width, - .height = surface->height}, - .pen = {.x = 0, .y = 0}, + .surface = *surface, + .subsurface = (uiRect){.x = 0, + .y = 0, + .width = surface->width, + .height = surface->height}, + .pen = {.x = 0, .y = 0}, }, (const uiWidget*)frame); } -- cgit v1.2.3