diff options
| author | Ray <[email protected]> | 2022-06-12 20:51:31 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-06-12 20:51:31 +0200 |
| commit | ad56a49da8d9b3600b7dc30bc0bd9aee483805af (patch) | |
| tree | 6750dd2a01e9e7cb9593ff82f8e70c831e2667c2 /src | |
| parent | e1e0bc4266a0506f9daad1c0eb4c7ee555ba81a9 (diff) | |
| download | raylib-ad56a49da8d9b3600b7dc30bc0bd9aee483805af.tar.gz raylib-ad56a49da8d9b3600b7dc30bc0bd9aee483805af.zip | |
Reviewed latest PR
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rcore.c b/src/rcore.c index 078dab15..c0d19420 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3887,16 +3887,15 @@ void SetMouseScale(float scaleX, float scaleY) // Get mouse wheel movement Y float GetMouseWheelMove(void) { -#if defined(PLATFORM_ANDROID) - return 0.0f; + 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 - Vector2 wm = CORE.Input.Mouse.currentWheelMove; - float result; - if (fabs(wm.x) > fabs(wm.y)) result = (float)wm.x; - else result = (float)wm.y; #if defined(PLATFORM_WEB) - return result/100.0f; + result =/ 100.0f; #endif return result; |
