mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
Fix scroll speed on recent GFE versions
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user