aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/touchpad.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/touchpad.c b/src/touchpad.c
index b55823dc..6f5ea537 100644
--- a/src/touchpad.c
+++ b/src/touchpad.c
@@ -149,7 +149,8 @@ void tpInit(const TOUCHPADDriver *tp) {
*/
uint16_t tpReadX(void) {
uint16_t x, y;
-#if defined(TOUCHPAD_XY_INVERTED) && (TOUCHPAD_XY_INVERTED == TRUE)
+
+#if TOUCHPAD_XY_INVERTED == TRUE
x = cal.xm * _tpReadRealY() + cal.xn;
y = cal.ym * _tpReadRealX() + cal.yn;
#else
@@ -179,7 +180,8 @@ uint16_t tpReadX(void) {
*/
uint16_t tpReadY(void) {
uint16_t x, y;
-#if defined(TOUCHPAD_XY_INVERTED) && (TOUCHPAD_XY_INVERTED == TRUE)
+
+#if TOUCHPAD_XY_INVERTED == TRUE
x = cal.xm * _tpReadRealY() + cal.xn;
y = cal.ym * _tpReadRealX() + cal.yn;
#else