Fixed relative mouse mode using warping after https://github.com/libsdl-org/SDL/commit/82793ac279d19b5bde8fc2bd62877b05ba5a76e0
This commit is contained in:
1 parent
a1fabca162
commit
88e9f7765c
1 file changed
+5
-1
@@ -359,7 +359,11 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
||||
return 0;
|
||||
}
|
||||
if (window && (window->flags & SDL_WINDOW_INPUT_FOCUS) != 0) {
|
||||
SDL_WarpMouseInWindow(window, center_x, center_y);
|
||||
if (mouse->WarpMouse) {
|
||||
mouse->WarpMouse(window, center_x, center_y);
|
||||
} else {
|
||||
SDL_PrivateSendMouseMotion(window, mouseID, 0, center_x, center_y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user