Fix scroll speed on recent GFE versions

This commit is contained in:
Cameron Gutman 2021-12-12 16:33:19 -06:00
parent 90d416ab34
commit eccf517dc3
4 changed files with 4 additions and 4 deletions

View File

@ -444,7 +444,7 @@ static const double MOUSE_SPEED_DIVISOR = 2.5;
short truncatedScrollY = (short)self->accumulatedScrollY; short truncatedScrollY = (short)self->accumulatedScrollY;
if (truncatedScrollY != 0) { if (truncatedScrollY != 0) {
LiSendHighResScrollEvent(truncatedScrollY); LiSendHighResScrollEvent(truncatedScrollY * 20);
self->accumulatedScrollY -= truncatedScrollY; self->accumulatedScrollY -= truncatedScrollY;
} }

View File

@ -106,7 +106,7 @@ static const int REFERENCE_HEIGHT = 720;
CGPoint avgLocation = CGPointMake((firstLocation.x + secondLocation.x) / 2, (firstLocation.y + secondLocation.y) / 2); CGPoint avgLocation = CGPointMake((firstLocation.x + secondLocation.x) / 2, (firstLocation.y + secondLocation.y) / 2);
if (touchLocation.y != avgLocation.y) { if (touchLocation.y != avgLocation.y) {
LiSendHighResScrollEvent(avgLocation.y - touchLocation.y); LiSendHighResScrollEvent((avgLocation.y - touchLocation.y) * 10);
} }
// If we've moved far enough to confirm this wasn't just human/machine error, // If we've moved far enough to confirm this wasn't just human/machine error,

View File

@ -471,7 +471,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
CGPoint currentScrollTranslation = [gesture translationInView:self]; CGPoint currentScrollTranslation = [gesture translationInView:self];
short translationDeltaY = ((currentScrollTranslation.y - lastScrollTranslation.y) / self.bounds.size.height) * 120; // WHEEL_DELTA short translationDeltaY = ((currentScrollTranslation.y - lastScrollTranslation.y) / self.bounds.size.height) * 120; // WHEEL_DELTA
if (translationDeltaY != 0) { if (translationDeltaY != 0) {
LiSendHighResScrollEvent(translationDeltaY); LiSendHighResScrollEvent(translationDeltaY * 20);
lastScrollTranslation = currentScrollTranslation; lastScrollTranslation = currentScrollTranslation;
} }
} }

@ -1 +1 @@
Subproject commit a290ec032b6a068a56461bbe4b60798b68a319d5 Subproject commit 6001ece0b8bfcea6a8122a3e56f48f515e1aaaf5