From 94178044d5d34e5bf65601d0b5da70d91284ec56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 8 Jun 2018 19:49:22 -0400 Subject: [PATCH] gallium/hud: = should rename the last added data source MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tested-by: Dieter Nützel --- src/gallium/auxiliary/hud/hud_context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 61db98b4b03..233202453ee 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -1214,6 +1214,8 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen, } while ((num = parse_string(env, name_a)) != 0) { + bool added = true; + env += num; /* check for explicit location, size and etc. settings */ @@ -1386,6 +1388,7 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen, screen, name)) { fprintf(stderr, "gallium_hud: unknown driver query '%s'\n", name); fflush(stderr); + added = false; } } } @@ -1428,7 +1431,7 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen, env += num; strip_hyphens(s); - if (!LIST_IS_EMPTY(&pane->graph_list)) { + if (added && !LIST_IS_EMPTY(&pane->graph_list)) { struct hud_graph *graph; graph = LIST_ENTRY(struct hud_graph, pane->graph_list.prev, head); strncpy(graph->name, s, sizeof(graph->name)-1); -- 2.30.2