aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/touchscreen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/touchscreen.c b/src/touchscreen.c
index 6694b391..eea6e273 100644
--- a/src/touchscreen.c
+++ b/src/touchscreen.c
@@ -325,9 +325,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++;
}
}