mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Wayland: Fix scroll offsets being inverted
Scrolling offsets were inverted compared to X11 and Win32.
Fixes #1463.
(cherry picked from commit f760b124ca
)
This commit is contained in:
parent
bd2fb9ebaf
commit
114704262c
@ -136,6 +136,8 @@ information on what to include when reporting a bug.
|
|||||||
reported (#1112,#1415,#1472,#1616)
|
reported (#1112,#1415,#1472,#1616)
|
||||||
- [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)
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
@ -274,6 +276,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
|
||||||
|
@ -347,9 +347,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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user