diff --git a/src/rcore.c b/src/rcore.c index fb4f3dae3..df2b025e0 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2099,19 +2099,6 @@ void SetMouseScale(float scaleX, float scaleY) CORE.Input.Mouse.scale = (Vector2){ scaleX, scaleY }; } -// Get mouse wheel movement Y -float GetMouseWheelMove(void) -{ - float result = 0.0f; - -#if !defined(PLATFORM_ANDROID) - if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x; - else result = (float)CORE.Input.Mouse.currentWheelMove.y; -#endif - - return result; -} - // Get mouse wheel movement X/Y as a vector Vector2 GetMouseWheelMoveV(void) { diff --git a/src/rcore_android.c b/src/rcore_android.c index 8073b8c87..e3178bc44 100644 --- a/src/rcore_android.c +++ b/src/rcore_android.c @@ -1676,3 +1676,10 @@ void SetMousePosition(int x, int y) CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y }; CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition; } + + +// Get mouse wheel movement Y +float GetMouseWheelMove(void) +{ + return 0.0f; +} diff --git a/src/rcore_desktop.c b/src/rcore_desktop.c index 1e7df73b8..698b094d0 100644 --- a/src/rcore_desktop.c +++ b/src/rcore_desktop.c @@ -1568,3 +1568,15 @@ void SetMousePosition(int x, int y) // NOTE: emscripten not implemented glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.currentPosition.x, CORE.Input.Mouse.currentPosition.y); } + + +// Get mouse wheel movement Y +float GetMouseWheelMove(void) +{ + float result = 0.0f; + + if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x; + else result = (float)CORE.Input.Mouse.currentWheelMove.y; + + return result; +} diff --git a/src/rcore_drm.c b/src/rcore_drm.c index 7cd601c59..a68beca54 100644 --- a/src/rcore_drm.c +++ b/src/rcore_drm.c @@ -1005,4 +1005,17 @@ void SetMousePosition(int x, int y) { CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y }; CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition; + +} + + +// Get mouse wheel movement Y +float GetMouseWheelMove(void) +{ + float result = 0.0f; + + if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x; + else result = (float)CORE.Input.Mouse.currentWheelMove.y; + + return result; } diff --git a/src/rcore_web.c b/src/rcore_web.c index 2efac05ff..a61a033cd 100644 --- a/src/rcore_web.c +++ b/src/rcore_web.c @@ -1609,3 +1609,15 @@ void SetMousePosition(int x, int y) // NOTE: emscripten not implemented glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.currentPosition.x, CORE.Input.Mouse.currentPosition.y); } + + +// Get mouse wheel movement Y +float GetMouseWheelMove(void) +{ + float result = 0.0f; + + if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x; + else result = (float)CORE.Input.Mouse.currentWheelMove.y; + + return result; +}