Loading services/inputflinger/include/InputReaderBase.h +3 −3 Original line number Diff line number Diff line Loading @@ -131,10 +131,10 @@ struct InputReaderConfiguration { // Currently only used when the enable_new_mouse_pointer_ballistics flag is enabled. int32_t mousePointerSpeed; // Whether to apply an acceleration curve to pointer movements from mice. // Displays on which an acceleration curve shouldn't be applied for pointer movements from mice. // // Currently only used when the enable_new_mouse_pointer_ballistics flag is enabled. bool mousePointerAccelerationEnabled; std::set<int32_t> displaysWithMousePointerAccelerationDisabled; // Velocity control parameters for mouse pointer movements. // Loading Loading @@ -243,7 +243,7 @@ struct InputReaderConfiguration { InputReaderConfiguration() : virtualKeyQuietTime(0), mousePointerSpeed(0), mousePointerAccelerationEnabled(true), displaysWithMousePointerAccelerationDisabled(), pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, static_cast<float>( android::os::IInputConstants:: Loading services/inputflinger/reader/mapper/CursorInputMapper.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -159,14 +159,14 @@ std::list<NotifyArgs> CursorInputMapper::reconfigure(nsecs_t when, out.push_back(NotifyDeviceResetArgs(getContext()->getNextId(), when, getDeviceId())); } if (!changes.any() || changes.test(InputReaderConfiguration::Change::POINTER_SPEED) || if (!changes.any() || changes.test(InputReaderConfiguration::Change::DISPLAY_INFO) || configurePointerCapture) { configureOnChangePointerSpeed(readerConfig); configureOnChangeDisplayInfo(readerConfig); } if (!changes.any() || changes.test(InputReaderConfiguration::Change::DISPLAY_INFO) || if (!changes.any() || changes.test(InputReaderConfiguration::Change::POINTER_SPEED) || configurePointerCapture) { configureOnChangeDisplayInfo(readerConfig); configureOnChangePointerSpeed(readerConfig); } return out; } Loading Loading @@ -510,7 +510,8 @@ void CursorInputMapper::configureOnChangePointerSpeed(const InputReaderConfigura } else { if (mEnableNewMousePointerBallistics) { mNewPointerVelocityControl.setAccelerationEnabled( config.mousePointerAccelerationEnabled); config.displaysWithMousePointerAccelerationDisabled.count( mDisplayId.value_or(ADISPLAY_ID_NONE)) == 0); mNewPointerVelocityControl.setCurve( createAccelerationCurveForPointerSensitivity(config.mousePointerSpeed)); } else { Loading Loading
services/inputflinger/include/InputReaderBase.h +3 −3 Original line number Diff line number Diff line Loading @@ -131,10 +131,10 @@ struct InputReaderConfiguration { // Currently only used when the enable_new_mouse_pointer_ballistics flag is enabled. int32_t mousePointerSpeed; // Whether to apply an acceleration curve to pointer movements from mice. // Displays on which an acceleration curve shouldn't be applied for pointer movements from mice. // // Currently only used when the enable_new_mouse_pointer_ballistics flag is enabled. bool mousePointerAccelerationEnabled; std::set<int32_t> displaysWithMousePointerAccelerationDisabled; // Velocity control parameters for mouse pointer movements. // Loading Loading @@ -243,7 +243,7 @@ struct InputReaderConfiguration { InputReaderConfiguration() : virtualKeyQuietTime(0), mousePointerSpeed(0), mousePointerAccelerationEnabled(true), displaysWithMousePointerAccelerationDisabled(), pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, static_cast<float>( android::os::IInputConstants:: Loading
services/inputflinger/reader/mapper/CursorInputMapper.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -159,14 +159,14 @@ std::list<NotifyArgs> CursorInputMapper::reconfigure(nsecs_t when, out.push_back(NotifyDeviceResetArgs(getContext()->getNextId(), when, getDeviceId())); } if (!changes.any() || changes.test(InputReaderConfiguration::Change::POINTER_SPEED) || if (!changes.any() || changes.test(InputReaderConfiguration::Change::DISPLAY_INFO) || configurePointerCapture) { configureOnChangePointerSpeed(readerConfig); configureOnChangeDisplayInfo(readerConfig); } if (!changes.any() || changes.test(InputReaderConfiguration::Change::DISPLAY_INFO) || if (!changes.any() || changes.test(InputReaderConfiguration::Change::POINTER_SPEED) || configurePointerCapture) { configureOnChangeDisplayInfo(readerConfig); configureOnChangePointerSpeed(readerConfig); } return out; } Loading Loading @@ -510,7 +510,8 @@ void CursorInputMapper::configureOnChangePointerSpeed(const InputReaderConfigura } else { if (mEnableNewMousePointerBallistics) { mNewPointerVelocityControl.setAccelerationEnabled( config.mousePointerAccelerationEnabled); config.displaysWithMousePointerAccelerationDisabled.count( mDisplayId.value_or(ADISPLAY_ID_NONE)) == 0); mNewPointerVelocityControl.setCurve( createAccelerationCurveForPointerSensitivity(config.mousePointerSpeed)); } else { Loading