[client] overlay: fix invalid label usage in igPlotLines call

This commit is contained in:
Geoffrey McRae
2026-07-30 08:55:03 +10:00
parent f5764dbd26
commit 0738ea402a

View File

@@ -57,7 +57,9 @@ static void configCallback(void * udata, int * id)
ll_forEachNL(gs.graphs, item, graph) ll_forEachNL(gs.graphs, item, graph)
{ {
igTableNextColumn(); igTableNextColumn();
igPushID_Ptr(graph);
igCheckbox(graph->name, &graph->enabled); igCheckbox(graph->name, &graph->enabled);
igPopID();
} }
ll_unlock(gs.graphs); ll_unlock(gs.graphs);
@@ -197,8 +199,9 @@ static int graphs_render(void * udata, bool interactive,
title = _title; title = _title;
} }
igPushID_Ptr(graph);
igPlotLines_FloatPtr( igPlotLines_FloatPtr(
(void *)graph, "##graph",
(float *)ringbuffer_getValues(graph->buffer), (float *)ringbuffer_getValues(graph->buffer),
ringbuffer_getLength(graph->buffer), ringbuffer_getLength(graph->buffer),
ringbuffer_getStart (graph->buffer), ringbuffer_getStart (graph->buffer),
@@ -207,6 +210,7 @@ static int graphs_render(void * udata, bool interactive,
graph->max, graph->max,
(ImVec2){ winSize.x, height }, (ImVec2){ winSize.x, height },
sizeof(float)); sizeof(float));
igPopID();
}; };
ll_unlock(gs.graphs); ll_unlock(gs.graphs);