From e1ee4b1466062d130b85e4a7763ceb7c3e05986f Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 24 Apr 2022 11:16:35 +0200 Subject: [PATCH] Reviewed MouseScrollCallback() #2371 --- src/rcore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 4d0883f2..6cff9e18 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -5404,10 +5404,10 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y) #endif } -// GLFW3 Srolling Callback, runs on mouse wheel +// GLFW3 Scrolling Callback, runs on mouse wheel static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset) { - if (xoffset != 0.0) CORE.Input.Mouse.currentWheelMove = (float)xoffset; + if ((float)xoffset != 0.0f) CORE.Input.Mouse.currentWheelMove = (float)xoffset; else CORE.Input.Mouse.currentWheelMove = (float)yoffset; }