summaryrefslogtreecommitdiff
path: root/libs/ui/InputReader.cpp
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2010-07-29 13:05:52 -0700
committer Jeff Brown <jeffbrown@google.com> 2010-07-29 13:05:52 -0700
commit82de2fcdd021f0bc2b1c3239601333b8796631ca (patch)
tree0567af92f0eb515bec33656b4bf715193af9b343 /libs/ui/InputReader.cpp
parentf67c53eee33d2a2296f269a504e11c90904b3d39 (diff)
Fix touch input in landscape mode.
Change-Id: I7d47e9b02e6443ed604a6bf842028a5db934d90d
Diffstat (limited to 'libs/ui/InputReader.cpp')
-rw-r--r--libs/ui/InputReader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index c5183e41b1..56e29778ee 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -1600,7 +1600,7 @@ void TouchInputMapper::dispatchTouch(nsecs_t when, uint32_t policyFlags,
case InputReaderPolicyInterface::ROTATION_90: {
float xTemp = x;
x = y;
- y = mOrientedSurfaceWidth - xTemp;
+ y = mSurfaceWidth - xTemp;
orientation -= M_PI_2;
if (orientation < - M_PI_2) {
orientation += M_PI;
@@ -1608,14 +1608,14 @@ void TouchInputMapper::dispatchTouch(nsecs_t when, uint32_t policyFlags,
break;
}
case InputReaderPolicyInterface::ROTATION_180: {
- x = mOrientedSurfaceWidth - x;
- y = mOrientedSurfaceHeight - y;
+ x = mSurfaceWidth - x;
+ y = mSurfaceHeight - y;
orientation = - orientation;
break;
}
case InputReaderPolicyInterface::ROTATION_270: {
float xTemp = x;
- x = mOrientedSurfaceHeight - y;
+ x = mSurfaceHeight - y;
y = xTemp;
orientation += M_PI_2;
if (orientation > M_PI_2) {