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

Commit 8791a0ee authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Tilt scale correction for certain resolutions" am: 9365dde6 am:...

Merge "Tilt scale correction for certain resolutions" am: 9365dde6 am: f6814fa0 am: 3f2d4930 am: e7c57308

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1753368

Change-Id: Ib19b24397cf92c8481af62c783f2649ecb8d34cb
parents 68f1458d e7c57308
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -896,6 +896,13 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
            mTiltXScale = M_PI / 180;
            mTiltYScale = M_PI / 180;

            if (mRawPointerAxes.tiltX.resolution) {
                mTiltXScale = 1.0 / mRawPointerAxes.tiltX.resolution;
            }
            if (mRawPointerAxes.tiltY.resolution) {
                mTiltYScale = 1.0 / mRawPointerAxes.tiltY.resolution;
            }

            mOrientedRanges.haveTilt = true;

            mOrientedRanges.tilt.axis = AMOTION_EVENT_AXIS_TILT;