From bdfca9d3d02ea5db00c19d1f8bf9a13d984e8159 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Tue, 10 Apr 2018 16:23:38 -0400 Subject: [PATCH] wmmon: Only compute vertical position of hint lines once. The system load monitor displays green hint lines at every 100 units once load average rises above 100. Previously, the vertical position of these lines was computed before each and every pixel was drawn. But since the horizontal position isn't needed for this computation, we move it up a level to the outer for loop. --- wmmon/wmmon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wmmon/wmmon.c b/wmmon/wmmon.c index 54301bd..d37c170 100644 --- a/wmmon/wmmon.c +++ b/wmmon/wmmon.c @@ -933,9 +933,8 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) /* Nu horizontaal op 100/200/300 etc lijntje trekken! */ for (j = pixels_per_byte-100; j > 0; j-=100) { + d = (40.0 / pixels_per_byte) * j; for (k=0; k