Fixing bug in mouse/touch calibration code
Thanks to AndreR
This commit is contained in:
parent
2dcd3509c9
commit
4a860eb079
1 changed files with 5 additions and 2 deletions
|
@ -56,8 +56,11 @@ static GTIMER_DECL(MouseTimer);
|
||||||
#include <string.h> // Required for memcpy
|
#include <string.h> // Required for memcpy
|
||||||
|
|
||||||
static GFXINLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) {
|
static GFXINLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) {
|
||||||
pt->x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx);
|
coord_t x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx);
|
||||||
pt->y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy);
|
coord_t y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy);
|
||||||
|
|
||||||
|
pt->x = x;
|
||||||
|
pt->y = y;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue