Skip to content

Commit 0698ecd

Browse files
author
Michael Checo
committed
Pointer sensitivity: Adjust base gain range
This CL updates the `calculateBaseGain` function to use a base gain range of [1.0, 2.5] instead of [0.5, 1.5]. This change ensures that the pointer movement is more responsive to changes in sensitivity. Bug: b/384552392 Test: Manual Flag: com.android.hardware.input.pointer_acceleration Change-Id: I5db7b1473fd5b6869f02fc4ef7aa1458a0df6f58
1 parent bdb3bc4 commit 0698ecd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libs/input/AccelerationCurve.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ constexpr std::array<double, 15> kSensitivityFactors = {1, 2, 4, 6, 7, 8,
4747
// in faster pointer movements.
4848
//
4949
// The base gain is calculated using a linear mapping function that maps the
50-
// sensitivity range [-7, 7] to a base gain range [0.5, 2.0].
50+
// sensitivity range [-7, 7] to a base gain range [1.0, 3.5].
5151
double calculateBaseGain(int32_t sensitivity) {
52-
return 0.5 + (sensitivity + 7) * (2.0 - 0.5) / (7 + 7);
52+
return 1.0 + (sensitivity + 7) * (3.5 - 1.0) / (7 + 7);
5353
}
5454

5555
} // namespace

0 commit comments

Comments
 (0)