From c35988ffb52f5218263c5bb13512e8d70ee59e87 Mon Sep 17 00:00:00 2001 From: Kumar Abhishek Date: Thu, 4 Oct 2012 15:12:57 +0530 Subject: [PATCH] Touchpad Issue Fix Fixed interchanged cases of landscape and landscapeInv in tpReadX() and tpReadY() --- src/touchpad.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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;