am aab985b9: Fix touch input in landscape mode.

Merge commit 'aab985b951c4cf5ec2753ffbec516164b3c03c3a' into gingerbread-plus-aosp

* commit 'aab985b951c4cf5ec2753ffbec516164b3c03c3a':
  Fix touch input in landscape mode.
This commit is contained in:
Jeff Brown
2010-07-29 13:13:38 -07:00
committed by Android Git Automerger

View File

@@ -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) {