diff options
| author | 2010-07-29 13:13:38 -0700 | |
|---|---|---|
| committer | 2010-07-29 13:13:38 -0700 | |
| commit | 9c7054119a701b46758cc6e04878bb0961e18ae9 (patch) | |
| tree | cad8a52b824a81c570e273da3aa52e89305c0a24 /libs/ui/InputReader.cpp | |
| parent | b0a57502c6f17edd1a63bee1463bc2f9fd78e4a4 (diff) | |
| parent | aab985b951c4cf5ec2753ffbec516164b3c03c3a (diff) | |
am aab985b9: Fix touch input in landscape mode.
Merge commit 'aab985b951c4cf5ec2753ffbec516164b3c03c3a' into gingerbread-plus-aosp
* commit 'aab985b951c4cf5ec2753ffbec516164b3c03c3a':
Fix touch input in landscape mode.
Diffstat (limited to 'libs/ui/InputReader.cpp')
| -rw-r--r-- | libs/ui/InputReader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp index c5183e41b13c..56e29778ee93 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) { |