diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-10-07 21:52:00 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-10-07 21:52:00 +1000 |
commit | ccf05e8c0a789bdedeae14065f14b72ca3811b38 (patch) | |
tree | c4c8dad3e6a30e58dd0dedcd7e33e7f7be064f22 /src/ginput | |
parent | 3af0498a4cc4d347221be3e2229da6849a5b2463 (diff) | |
download | uGFX-ccf05e8c0a789bdedeae14065f14b72ca3811b38.tar.gz uGFX-ccf05e8c0a789bdedeae14065f14b72ca3811b38.tar.bz2 uGFX-ccf05e8c0a789bdedeae14065f14b72ca3811b38.zip |
Fix bugs in newmouse framework
Diffstat (limited to 'src/ginput')
-rw-r--r-- | src/ginput/ginput_mouse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c index 4e2bc2dd..94d5e5ef 100644 --- a/src/ginput/ginput_mouse.c +++ b/src/ginput/ginput_mouse.c @@ -230,7 +230,7 @@ static void GetMouseReading(GMouse *m) { // Is this just movement jitter if (pj->move > 0) { diff = (uint32_t)(r.x - m->r.x) * (uint32_t)(r.x - m->r.x) + (uint32_t)(r.y - m->r.y) * (uint32_t)(r.y - m->r.y); - if (diff > (uint32_t)pj->move * (uint32_t)pj->move) { + if (diff < (uint32_t)pj->move * (uint32_t)pj->move) { r.x = m->r.x; r.y = m->r.y; } @@ -344,7 +344,7 @@ static void MousePoll(void *param) { } static inline void CalibrationCrossClear(GMouse *m, const point *pp) { - gdispGFillArea(m->display, pp->x - CALIBRATION_CROSS_RADIUS, pp->y - CALIBRATION_CROSS_RADIUS, CALIBRATION_CROSS_RADIUS*2, CALIBRATION_CROSS_RADIUS*2, CALIBRATION_BACKGROUND); + gdispGFillArea(m->display, pp->x - CALIBRATION_CROSS_RADIUS, pp->y - CALIBRATION_CROSS_RADIUS, CALIBRATION_CROSS_RADIUS*2+1, CALIBRATION_CROSS_RADIUS*2+1, CALIBRATION_BACKGROUND); } static inline void CalibrationCalculate(GMouse *m, const point *cross, const point *points) { |