diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-04-08 17:40:56 -0400 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-04-08 17:40:56 -0400 |
commit | 1398b5dd201a69d4c769adce4bf4eabb5e3a28fa (patch) | |
tree | 78b7bc4c94442fa09fda319e93dabd5f513fa226 /calibrate.c | |
parent | 96cec93d3c7461587673b5dc35c6fba1e9db899f (diff) | |
download | libsurvive-1398b5dd201a69d4c769adce4bf4eabb5e3a28fa.tar.gz libsurvive-1398b5dd201a69d4c769adce4bf4eabb5e3a28fa.tar.bz2 |
don't paint 0 coordinates
Diffstat (limited to 'calibrate.c')
-rw-r--r-- | calibrate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/calibrate.c b/calibrate.c index 71bdcab..67c1d27 100644 --- a/calibrate.c +++ b/calibrate.c @@ -138,6 +138,9 @@ void * GuiThread( void * v ) // g = (g * (5-buffertimeto[i][nn])) / 5 ; // b = (b * (5-buffertimeto[i][nn])) / 5 ; CNFGColor( (b<<16) | (g<<8) | r ); + + if (bufferpts[i*2+0][nn] == 0 || bufferpts[i*2+1][nn]==0) continue; //do not draw if aither coordinate is 0 + CNFGTackRectangle( bufferpts[i*2+0][nn], bufferpts[i*2+1][nn], bufferpts[i*2+0][nn] + 5, bufferpts[i*2+1][nn] + 5 ); CNFGPenX = bufferpts[i*2+0][nn]; CNFGPenY = bufferpts[i*2+1][nn]; CNFGDrawText( buffermts, 2 ); |