1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-12-03 07:28:51 -05:00

Wayland: Fix scroll offsets being inverted

Scrolling offsets were inverted compared to X11 and Win32.

Fixes #1463.
This commit is contained in:
Camilla Löwy 2020-07-15 23:11:19 +02:00
parent 5f60c22cfa
commit f760b124ca
2 changed files with 5 additions and 2 deletions

View File

@ -199,6 +199,8 @@ information on what to include when reporting a bug.
- [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled - [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
- [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704) - [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
- [Wayland] Bugfix: Retrieving partial framebuffer size would segfault - [Wayland] Bugfix: Retrieving partial framebuffer size would segfault
- [Wayland] Bugfix: Scrolling offsets were inverted compared to other platforms
(#1463)
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled - [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
- [NSGL] Removed enforcement of forward-compatible flag for core contexts - [NSGL] Removed enforcement of forward-compatible flag for core contexts
- [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer - [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
@ -345,6 +347,7 @@ skills.
- ndogxj - ndogxj
- Kristian Nielsen - Kristian Nielsen
- Kamil Nowakowski - Kamil Nowakowski
- onox
- Denis Ovod - Denis Ovod
- Ozzy - Ozzy
- Andri Pálsson - Andri Pálsson

View File

@ -341,9 +341,9 @@ static void pointerHandleAxis(void* data,
axis == WL_POINTER_AXIS_VERTICAL_SCROLL); axis == WL_POINTER_AXIS_VERTICAL_SCROLL);
if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL) if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL)
x = wl_fixed_to_double(value) * scrollFactor; x = -wl_fixed_to_double(value) * scrollFactor;
else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL) else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL)
y = wl_fixed_to_double(value) * scrollFactor; y = -wl_fixed_to_double(value) * scrollFactor;
_glfwInputScroll(window, x, y); _glfwInputScroll(window, x, y);
} }