From 1ba2539b6c11402835e4f8554678f0c0e64dfbc1 Mon Sep 17 00:00:00 2001 From: mobyfab Date: Sat, 10 Nov 2012 17:10:19 +0100 Subject: [PATCH] Adding TOUCHSCREEN_XY_INVERTED define to the calibration function. --- src/touchscreen.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/touchscreen.c b/src/touchscreen.c index d7abbe30..8f403d4e 100644 --- a/src/touchscreen.c +++ b/src/touchscreen.c @@ -324,9 +324,14 @@ calibrate: while(j < MAX_CAL_SAMPLES) { if(tsPressed()) { /* We have valid pointer data */ + +#if TOUCHSCREEN_XY_INVERTED == TRUE + py += _tsReadRealX(); + px += _tsReadRealY(); +#else px += _tsReadRealX(); py += _tsReadRealY(); - +#endif j++; } }