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

Commit 58450e8b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "CursorInputMapper: Use flat velocity params when acceleration is disabled" into main

parents a906c376 ae474440
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -164,8 +164,9 @@ std::list<NotifyArgs> CursorInputMapper::reconfigure(nsecs_t when,
        configureOnChangeDisplayInfo(readerConfig);
    }

    // Pointer speed settings depend on display settings.
    if (!changes.any() || changes.test(InputReaderConfiguration::Change::POINTER_SPEED) ||
        configurePointerCapture) {
        changes.test(InputReaderConfiguration::Change::DISPLAY_INFO) || configurePointerCapture) {
        configureOnChangePointerSpeed(readerConfig);
    }
    return out;
@@ -515,7 +516,11 @@ void CursorInputMapper::configureOnChangePointerSpeed(const InputReaderConfigura
            mNewPointerVelocityControl.setCurve(
                    createAccelerationCurveForPointerSensitivity(config.mousePointerSpeed));
        } else {
            mOldPointerVelocityControl.setParameters(config.pointerVelocityControlParameters);
            mOldPointerVelocityControl.setParameters(
                    (config.displaysWithMousePointerAccelerationDisabled.count(
                             mDisplayId.value_or(ADISPLAY_ID_NONE)) == 0)
                            ? config.pointerVelocityControlParameters
                            : FLAT_VELOCITY_CONTROL_PARAMS);
        }
        mWheelXVelocityControl.setParameters(config.wheelVelocityControlParameters);
        mWheelYVelocityControl.setParameters(config.wheelVelocityControlParameters);