* commit '5da11106b3aa10d515d0f080c27f315d5830dc85': Check orientation range has been initialized first
This commit is contained in:
commit
104e268c32
@ -4567,7 +4567,7 @@ void TouchInputMapper::cookPointerData() {
|
||||
bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate;
|
||||
top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate;
|
||||
orientation -= M_PI_2;
|
||||
if (orientation < mOrientedRanges.orientation.min) {
|
||||
if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) {
|
||||
orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
|
||||
}
|
||||
break;
|
||||
@ -4579,7 +4579,7 @@ void TouchInputMapper::cookPointerData() {
|
||||
bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate;
|
||||
top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate;
|
||||
orientation -= M_PI;
|
||||
if (orientation < mOrientedRanges.orientation.min) {
|
||||
if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) {
|
||||
orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
|
||||
}
|
||||
break;
|
||||
@ -4591,7 +4591,7 @@ void TouchInputMapper::cookPointerData() {
|
||||
bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
|
||||
top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
|
||||
orientation += M_PI_2;
|
||||
if (orientation > mOrientedRanges.orientation.max) {
|
||||
if (mOrientedRanges.haveOrientation && orientation > mOrientedRanges.orientation.max) {
|
||||
orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user