macOS: Fix touch scrolling sensitivity low on retina screens

Fixes #1112
This commit is contained in:
Kovid Goyal 2018-11-04 12:07:55 +05:30
parent be6556c884
commit 82f9aecacb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 0 deletions

View File

@ -43,6 +43,8 @@ Changelog
- macOS: Use the system default double click interval (:pull:`1090`)
- macOS: Fix touch scrolling sensitivity low on retina screens (:iss:`1112`)
- Linux: Fix match rules used as aliases in Fontconfig configuration not being
respected (:iss:`1085`)

View File

@ -902,6 +902,11 @@ is_ascii_control_char(char x) {
deltaX = [event scrollingDeltaX];
deltaY = [event scrollingDeltaY];
int flags = [event hasPreciseScrollingDeltas] ? 1 : 0;
if (flags) {
float xscale = 1, yscale = 1;
_glfwPlatformGetWindowContentScale(window, &xscale, &yscale);
if (yscale > 0) deltaY *= yscale;
}
if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0)
_glfwInputScroll(window, deltaX, deltaY, flags);