aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-06-08 19:49:22 -0400
committerMarek Olšák <[email protected]>2018-06-18 17:53:15 -0400
commit94178044d5d34e5bf65601d0b5da70d91284ec56 (patch)
tree529900bc5df05523452e0368f5e2f080edefa526 /src
parentba2c18763b2fa7fa04e391850f842b4236e844da (diff)
gallium/hud: = should rename the last added data source
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c5
1 files changed, 4 insertions, 1 deletions
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);