ImGui: avoid garbage at the beginning of graphs

This commit is contained in:
Andy Grundman
2025-07-20 17:08:53 +08:00
committed by Acaki
parent 13a1a4d97b
commit 034ee52eec
+2 -1
View File
@@ -327,7 +327,8 @@ inline static float getValue(void *buffer, int idx) {
for (int i = 0; i < PlotCount; i++) {
if (self.plots[i].side != PLOT_LEFT) continue;
float minY, maxY;
float minY = 0.0f;
float maxY = 0.0f;
int countF = [self.plots[i].buffer copyValuesIntoBuffer:buffers[i] min:&minY max:&maxY];
float avgF = [self.plots[i].buffer averageValue];
if (!countF) {