Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc8288a6 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am 9c705411: am aab985b9: Fix touch input in landscape mode.

Merge commit '9c7054119a701b46758cc6e04878bb0961e18ae9'

* commit '9c7054119a701b46758cc6e04878bb0961e18ae9':
  Fix touch input in landscape mode.
parents 57800c09 232a09e7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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) {