summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJuan Carlos González Amestoy <[email protected]>2022-04-24 17:05:45 +0200
committerGitHub <[email protected]>2022-04-24 17:05:45 +0200
commitf2c7b0d3bf689f57162b98ab133f9f3a4d7a9643 (patch)
treed72c285ee3f08ecffd3dd0fe76773d981df073ca /src
parent74ca81338e45937c1f36efecdae4c7b4c293431c (diff)
downloadraylib-f2c7b0d3bf689f57162b98ab133f9f3a4d7a9643.tar.gz
raylib-f2c7b0d3bf689f57162b98ab133f9f3a4d7a9643.zip
- Fix issue #2371 (#2437)
Diffstat (limited to 'src')
-rw-r--r--src/rcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rcore.c b/src/rcore.c
index 5e579006..26fe01a8 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -5409,7 +5409,7 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
// GLFW3 Scrolling Callback, runs on mouse wheel
static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
{
- if ((float)xoffset != 0.0f) CORE.Input.Mouse.currentWheelMove = (float)xoffset;
+ if (fabs(xoffset)>fabs(yoffset)) CORE.Input.Mouse.currentWheelMove = (float)xoffset;
else CORE.Input.Mouse.currentWheelMove = (float)yoffset;
}