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

Commit 5da11106 authored by Michael Wright's avatar Michael Wright Committed by Android Git Automerger
Browse files

am 7ecc8952: Merge "Check orientation range has been initialized first"

* commit '7ecc8952':
  Check orientation range has been initialized first
parents ef47c080 7ecc8952
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -4315,7 +4315,7 @@ void TouchInputMapper::cookPointerData() {
            bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate;
            bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate;
            top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate;
            top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate;
            orientation -= M_PI_2;
            orientation -= M_PI_2;
            if (orientation < mOrientedRanges.orientation.min) {
            if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) {
                orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
                orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
            }
            }
            break;
            break;
@@ -4327,7 +4327,7 @@ void TouchInputMapper::cookPointerData() {
            bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate;
            bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate;
            top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate;
            top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate;
            orientation -= M_PI;
            orientation -= M_PI;
            if (orientation < mOrientedRanges.orientation.min) {
            if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) {
                orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
                orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
            }
            }
            break;
            break;
@@ -4339,7 +4339,7 @@ void TouchInputMapper::cookPointerData() {
            bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
            bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
            top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
            top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
            orientation += M_PI_2;
            orientation += M_PI_2;
            if (orientation > mOrientedRanges.orientation.max) {
            if (mOrientedRanges.haveOrientation && orientation > mOrientedRanges.orientation.max) {
                orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
                orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
            }
            }
            break;
            break;