mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-29 20:57:59 +08:00
SDL_GetRelativeMouseState(): Get relative mouse position also when relative mouse mode is disabled
This commit is contained in:
committed by
Sam Lantinga
parent
cedf53bbc2
commit
5dce8c748f
@@ -748,10 +748,8 @@ static void SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL
|
|||||||
|
|
||||||
// modify internal state
|
// modify internal state
|
||||||
{
|
{
|
||||||
if (relative) {
|
mouse->x_accu += xrel;
|
||||||
mouse->x_accu += xrel;
|
mouse->y_accu += yrel;
|
||||||
mouse->y_accu += yrel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (relative && mouse->has_position) {
|
if (relative && mouse->has_position) {
|
||||||
mouse->x += xrel;
|
mouse->x += xrel;
|
||||||
|
|||||||
Reference in New Issue
Block a user