mirror of
https://github.com/glfw/glfw.git
synced 2024-11-13 14:03:52 +00:00
parent
682f1cf203
commit
8dab9f6ab1
@ -137,6 +137,9 @@ static void pointerHandleAxis(void* data,
|
|||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
assert(axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL ||
|
||||||
|
axis == WL_POINTER_AXIS_VERTICAL_SCROLL);
|
||||||
|
|
||||||
/* Wayland scroll events are in pointer motion coordinate space (think
|
/* Wayland scroll events are in pointer motion coordinate space (think
|
||||||
* two finger scroll). The factor 10 is commonly used to convert to
|
* two finger scroll). The factor 10 is commonly used to convert to
|
||||||
* "scroll step means 1.0. */
|
* "scroll step means 1.0. */
|
||||||
@ -152,9 +155,6 @@ static void pointerHandleAxis(void* data,
|
|||||||
x = 0.0;
|
x = 0.0;
|
||||||
y = wl_fixed_to_double(value) * scrollFactor;
|
y = wl_fixed_to_double(value) * scrollFactor;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
assert(GLFW_FALSE);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfwInputScroll(window, x, y);
|
_glfwInputScroll(window, x, y);
|
||||||
|
Loading…
Reference in New Issue
Block a user