diff --git a/src/touchpad.c b/src/touchpad.c index f0da743c..db26f36d 100644 --- a/src/touchpad.c +++ b/src/touchpad.c @@ -157,11 +157,11 @@ uint16_t tpReadX(void) { case portrait: return x; case landscape: - return SCREEN_HEIGHT - y; - case portraitInv: - return SCREEN_WIDTH - x; - case landscapeInv: return y; + case portraitInv: + return SCREEN_WIDTH - x - 1; + case landscapeInv: + return SCREEN_HEIGHT - y - 1; } return 0; @@ -184,11 +184,11 @@ uint16_t tpReadY(void) { case portrait: return y; case landscape: - return x; + return SCREEN_WIDTH - x - 1; case portraitInv: - return SCREEN_HEIGHT - y; + return SCREEN_HEIGHT - y - 1; case landscapeInv: - return SCREEN_WIDTH - x; + return x; } return 0;