Преглед на файлове

Fix SetMousePosition() for SDL (#3580)

ubkp преди 1 година
родител
ревизия
1906f1eddf
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/platforms/rcore_desktop_sdl.c

+ 2 - 0
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;
 }