diff options
| author | ubkp <[email protected]> | 2023-11-28 16:37:04 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-28 20:37:04 +0100 |
| commit | 1906f1eddf5220f6324471ebf4929f229115d2bb (patch) | |
| tree | c10574d944afab84a114fdc9f7158ce076a8184d | |
| parent | 811abcb19faba710839a254ee3781a8d0ab23337 (diff) | |
| download | raylib-1906f1eddf5220f6324471ebf4929f229115d2bb.tar.gz raylib-1906f1eddf5220f6324471ebf4929f229115d2bb.zip | |
Fix SetMousePosition() for SDL (#3580)
| -rw-r--r-- | src/platforms/rcore_desktop_sdl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 58b337ff..4a3195d8 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -941,6 +941,8 @@ int SetGamepadMappings(const char *mappings) // Set mouse position XY void SetMousePosition(int x, int y) { + SDL_WarpMouseInWindow(platform.window, x, y); + CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y }; CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition; } |
