diff --git a/README.md b/README.md index 0ef3a94b..401dbec7 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,8 @@ GLFW bundles a number of dependencies in the `deps/` directory. bit field was unchanged - [Cocoa] Bugfix: Joystick enumeration took hundreds of ms on some systems - [Cocoa] Bugfix: The cursor was hidden when the user resized a GLFW window + - [Cocoa] Bugfix: The X-axis scroll offsets were inverted relative to the + Windows and X11 ports - [Win32] Enabled generation of pkg-config file for MinGW - [Win32] Removed option to require explicitly linking against `winmm.dll` - [Win32] Bugfix: Failure to load winmm or its functions was not reported to diff --git a/src/cocoa_window.m b/src/cocoa_window.m index ae82d8ca..463c02c6 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -683,7 +683,12 @@ static int translateKey(unsigned int key) } if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0) - _glfwInputScroll(window, deltaX, deltaY); + { + // NOTE: The X-axis is inverted for consistency with Windows and X11. + // Natural scrolling inverts both axes, making it consistent with + // the similarly named feature on modern X11 desktop systems. + _glfwInputScroll(window, -deltaX, deltaY); + } } - (void)resetCursorRects