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

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

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

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

Change-Id: I3c9923ce5f36ccdddbc9d1a646f6493df9230a62
parents 3010764a 9365dde6
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;