Fix touch input in landscape mode.
Change-Id: I7d47e9b02e6443ed604a6bf842028a5db934d90d
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index c5183e4..56e2977 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -1600,7 +1600,7 @@
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 @@
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) {