Implement high precision scrolling with the trackpad on platforms such as macOS and Wayland that implement it.

Fixes #819. Note that I have no idea whether the code works well on
retina screens, might have to multiple the pixel count by the scale
factor on those screens?
This commit is contained in:
Kovid Goyal
2018-08-24 11:00:58 +05:30
parent 0e0e25f986
commit 009ef54de7
13 changed files with 56 additions and 46 deletions

4
glfw/input.c vendored
View File

@@ -286,10 +286,10 @@ void _glfwInputKeyboard(_GLFWwindow* window, int key, int scancode, int action,
// Notifies shared code of a scroll event
//
void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset)
void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset, int flags)
{
if (window->callbacks.scroll)
window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset);
window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset, flags);
}
// Notifies shared code of a mouse button click event