diff options
author | 2013-05-28 15:43:16 -0700 | |
---|---|---|
committer | 2013-05-28 15:43:16 -0700 | |
commit | c8c82009dc8c146efadac6b51702922148f6003f (patch) | |
tree | b99ad196c60c4f204bf0bb5f231594dffc43a694 | |
parent | 79df1e65455fdb69f07675cffae99dea06a5afb2 (diff) | |
parent | 7573e5947a643dd8b8a97ee9dbf1dab398ad4ea7 (diff) |
resolved conflicts for merge of 7573e594 to stage-aosp-master
Change-Id: Ic19294c82ec023707e23b5848901426433b22e9f
-rw-r--r-- | services/input/InputReader.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index c774763fafe4..e2297554e7d8 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -4252,8 +4252,8 @@ void TouchInputMapper::cookPointerData() { bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate; top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate; orientation -= M_PI_2; - if (orientation < - M_PI_2) { - orientation += M_PI; + if (orientation < mOrientedRanges.orientation.min) { + orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); } break; case DISPLAY_ORIENTATION_180: @@ -4263,6 +4263,10 @@ void TouchInputMapper::cookPointerData() { right = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate; bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate; top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate; + orientation -= M_PI; + if (orientation < mOrientedRanges.orientation.min) { + orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); + } break; case DISPLAY_ORIENTATION_270: x = float(mRawPointerAxes.y.maxValue - in.y) * mYScale + mYTranslate; @@ -4272,8 +4276,8 @@ void TouchInputMapper::cookPointerData() { bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate; top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate; orientation += M_PI_2; - if (orientation > M_PI_2) { - orientation -= M_PI; + if (orientation > mOrientedRanges.orientation.max) { + orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); } break; default: |