diff options
author | Kumar Abhishek <abhishek.kakkar@hotmail.com> | 2012-10-04 15:12:57 +0530 |
---|---|---|
committer | Kumar Abhishek <abhishek.kakkar@hotmail.com> | 2012-10-04 15:12:57 +0530 |
commit | c35988ffb52f5218263c5bb13512e8d70ee59e87 (patch) | |
tree | 03445d76798d63617f7f9b93546a0e49d6a22767 /src/touchpad.c | |
parent | a03b2fbf5d4ee3d92323ba0674d833b0e9646b28 (diff) | |
download | uGFX-c35988ffb52f5218263c5bb13512e8d70ee59e87.tar.gz uGFX-c35988ffb52f5218263c5bb13512e8d70ee59e87.tar.bz2 uGFX-c35988ffb52f5218263c5bb13512e8d70ee59e87.zip |
Touchpad Issue Fix
Fixed interchanged cases of landscape and landscapeInv in tpReadX()
and tpReadY()
Diffstat (limited to 'src/touchpad.c')
-rw-r--r-- | src/touchpad.c | 12 |
1 files changed, 6 insertions, 6 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; + return y; case portraitInv: - return SCREEN_WIDTH - x; + return SCREEN_WIDTH - x - 1; case landscapeInv: - return y; + 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; |