Sfoglia il codice sorgente

Fix SetMousePosition() for SDL (#3580)

pull/3582/head
ubkp 1 anno fa
committed by GitHub
parent
commit
1906f1eddf
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. +2
    -0
      src/platforms/rcore_desktop_sdl.c

+ 2
- 0
src/platforms/rcore_desktop_sdl.c Vedi File

@ -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;
}

Caricamento…
Annulla
Salva