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

Commit 9365dde6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Tilt scale correction for certain resolutions"

parents ab281ec6 35e05533
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -905,6 +905,13 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
            mTiltXScale = M_PI / 180;
            mTiltXScale = M_PI / 180;
            mTiltYScale = 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.haveTilt = true;


            mOrientedRanges.tilt.axis = AMOTION_EVENT_AXIS_TILT;
            mOrientedRanges.tilt.axis = AMOTION_EVENT_AXIS_TILT;