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

Commit e7c57308 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: f6814fa0 am: 3f2d4930

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

Change-Id: Ib63fc8af5672101ca17e32b1b637e2fcb02078aa
parents f79c3620 3f2d4930
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;