summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-08-24 15:26:59 +0200
committerraysan5 <[email protected]>2021-08-24 15:26:59 +0200
commit7c1889c28205b83afaa39da73f1831a72bd9c502 (patch)
tree50de5f5e75aa852fbbf943bb8fdc7b110a0177f1 /src
parent45fd75952dd969e0d8f5aa778d6f0bf82aff0f63 (diff)
downloadraylib-7c1889c28205b83afaa39da73f1831a72bd9c502.tar.gz
raylib-7c1889c28205b83afaa39da73f1831a72bd9c502.zip
REVIEWED: Support mouse wheel on x-axis #1948
Diffstat (limited to 'src')
-rw-r--r--src/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index 52245b80..aff8cdd3 100644
--- a/src/core.c
+++ b/src/core.c
@@ -5059,7 +5059,8 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
// GLFW3 Srolling Callback, runs on mouse wheel
static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
{
- CORE.Input.Mouse.currentWheelMove = (float)yoffset;
+ if (xoffset != 0.0) CORE.Input.Mouse.currentWheelMove = (float)xoffset;
+ else CORE.Input.Mouse.currentWheelMove = (float)yoffset;
}
// GLFW3 CursorEnter Callback, when cursor enters the window