Fix SetMousePosition() for SDL (#3580)
This commit is contained in:
parent
811abcb19f
commit
1906f1eddf
1 changed files with 2 additions and 0 deletions
|
@ -941,6 +941,8 @@ int SetGamepadMappings(const char *mappings)
|
||||||
// Set mouse position XY
|
// Set mouse position XY
|
||||||
void SetMousePosition(int x, int y)
|
void SetMousePosition(int x, int y)
|
||||||
{
|
{
|
||||||
|
SDL_WarpMouseInWindow(platform.window, x, y);
|
||||||
|
|
||||||
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
||||||
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
|
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue