Module: Mesa
Branch: master
Commit: 94178044d5d34e5bf65601d0b5da70d91284ec56
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=94178044d5d34e5bf65601d0b5da70d91284ec56

Author: Marek Olšák <[email protected]>
Date:   Fri Jun  8 19:49:22 2018 -0400

gallium/hud: = should rename the last added data source

Tested-by: Dieter Nützel <[email protected]>

---

 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 61db98b4b0..233202453e 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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to