From 3b4b5761aa25de0834c3e9e1d5b2dba310008c46 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 12 Dec 2025 15:10:32 +0100 Subject: [PATCH] hud: only increase y if the pane contains graphs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the layout of "fps,cpu" identical to "fps,stdout,cpu". Without this change, the ',' separator after 'stdout' would increase y and we would have a gap between the fps and cpu graphs. Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/hud/hud_context.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index a9bc1693a72..03aba66bb3b 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -1508,14 +1508,15 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen, if (!pane) break; - y += height + hud->font.glyph_height * (pane->num_graphs + 2); - y_simple += hud->font.glyph_height * (pane->num_graphs + 1); - height = 100; - if (pane && pane->num_graphs) { + y += height + hud->font.glyph_height * (pane->num_graphs + 2); + y_simple += hud->font.glyph_height * (pane->num_graphs + 1); list_addtail(&pane->head, &hud->pane_list); pane = NULL; } + + height = 100; + break; case ';':