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.
This commit is contained in:
parent
7354c4df53
commit
bdfca9d3d0
|
@ -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<num; k++) {
|
||||
d = (40.0 / pixels_per_byte) * j;
|
||||
|
||||
copyXPMArea(2, 91, 1, 1, k+x_left, y_bottom-d);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue