diff options
| author | Doyle <[email protected]> | 2020-10-06 05:16:23 +1100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-05 20:16:23 +0200 |
| commit | b29311c7cacf17b3512d837951d9e02fceae586f (patch) | |
| tree | 01d7e1f1461118861c7a1439a3aa39b199bbed19 /src/camera.h | |
| parent | a4ea9f872ffef9ffe66fade37e984c3cc97910cb (diff) | |
| download | raylib-b29311c7cacf17b3512d837951d9e02fceae586f.tar.gz raylib-b29311c7cacf17b3512d837951d9e02fceae586f.zip | |
mouse: Return float movement for precise scrolling where possible (#1397)
Diffstat (limited to 'src/camera.h')
| -rw-r--r-- | src/camera.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/camera.h b/src/camera.h index 3b0feb43..2463200c 100644 --- a/src/camera.h +++ b/src/camera.h @@ -236,7 +236,7 @@ static void DisableCursor() {} // Lock cursor static int IsKeyDown(int key) { return 0; } static int IsMouseButtonDown(int button) { return 0;} -static int GetMouseWheelMove() { return 0; } +static float GetMouseWheelMove() { return 0.f; } static Vector2 GetMousePosition() { return (Vector2){ 0.0f, 0.0f }; } #endif @@ -285,7 +285,7 @@ void UpdateCamera(Camera *camera) // Mouse movement detection Vector2 mousePositionDelta = { 0.0f, 0.0f }; Vector2 mousePosition = GetMousePosition(); - int mouseWheelMove = GetMouseWheelMove(); + float mouseWheelMove = GetMouseWheelMove(); // Keys input detection // TODO: Input detection is raylib-dependant, it could be moved outside the module |
