Refactor GLFW scroll event callback to use a proper event struct

This commit is contained in:
Kovid Goyal
2025-12-31 23:40:34 +05:30
parent 573bfb688a
commit ba3af8f2c3
10 changed files with 162 additions and 107 deletions

4
glfw/input.c vendored
View File

@@ -353,10 +353,10 @@ void _glfwInputKeyboard(_GLFWwindow* window, GLFWkeyevent* ev)
// Notifies shared code of a scroll event
//
void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset, int flags, int mods)
void _glfwInputScroll(_GLFWwindow* window, const GLFWScrollEvent *ev)
{
if (window->callbacks.scroll)
window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset, flags, mods);
window->callbacks.scroll((GLFWwindow*) window, ev);
}
// Notifies shared code of a mouse button click event