Add support for edge to edge touch calibration.
This commit is contained in:
parent
c24ec8daf2
commit
021f71445e
2 changed files with 14 additions and 9 deletions
|
@ -31,6 +31,11 @@
|
||||||
#define GINPUT_MOUSE_NEED_CALIBRATION FALSE
|
#define GINPUT_MOUSE_NEED_CALIBRATION FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// TRUE/FALSE - Should the calibration happen at the extremes of the panel?
|
||||||
|
#ifndef GINPUT_MOUSE_CALIBRATE_EXTREMES
|
||||||
|
#define GINPUT_MOUSE_CALIBRATE_EXTREMES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
// TRUE/FALSE - Can the mouse/touch driver itself save calibration data?
|
// TRUE/FALSE - Can the mouse/touch driver itself save calibration data?
|
||||||
#ifndef GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE
|
#ifndef GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE
|
||||||
#define GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE FALSE
|
#define GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE FALSE
|
||||||
|
|
|
@ -428,16 +428,16 @@ bool_t ginputCalibrateMouse(uint16_t instance) {
|
||||||
|
|
||||||
const coord_t height = gdispGGetHeight(MouseConfig.display);
|
const coord_t height = gdispGGetHeight(MouseConfig.display);
|
||||||
const coord_t width = gdispGGetWidth(MouseConfig.display);
|
const coord_t width = gdispGGetWidth(MouseConfig.display);
|
||||||
#if 1
|
#if GINPUT_MOUSE_CALIBRATE_EXTREMES
|
||||||
const MousePoint cross[] = {{(width / 4), (height / 4)},
|
|
||||||
{(width - (width / 4)) , (height / 4)},
|
|
||||||
{(width - (width / 4)) , (height - (height / 4))},
|
|
||||||
{(width / 2), (height / 2)}}; /* Check point */
|
|
||||||
#else
|
|
||||||
const MousePoint cross[] = {{0, 0},
|
const MousePoint cross[] = {{0, 0},
|
||||||
{(width - 1) , 0},
|
{(width - 1) , 0},
|
||||||
{(width - 1) , (height - 1)},
|
{(width - 1) , (height - 1)},
|
||||||
{(width / 2), (height / 2)}}; /* Check point */
|
{(width / 2), (height / 2)}}; /* Check point */
|
||||||
|
#else
|
||||||
|
const MousePoint cross[] = {{(width / 4), (height / 4)},
|
||||||
|
{(width - (width / 4)) , (height / 4)},
|
||||||
|
{(width - (width / 4)) , (height - (height / 4))},
|
||||||
|
{(width / 2), (height / 2)}}; /* Check point */
|
||||||
#endif
|
#endif
|
||||||
MousePoint points[GINPUT_MOUSE_CALIBRATION_POINTS];
|
MousePoint points[GINPUT_MOUSE_CALIBRATION_POINTS];
|
||||||
const MousePoint *pc;
|
const MousePoint *pc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue