Browse Source

SDL_GetRelativeMouseState(): Get relative mouse position also when relative mouse mode is disabled

Petar Popovic 7 months ago
parent
commit
5dce8c748f
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/events/SDL_mouse.c

+ 2 - 4
src/events/SDL_mouse.c

@@ -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->y_accu += yrel;
-        }
+        mouse->x_accu += xrel;
+        mouse->y_accu += yrel;
 
 
         if (relative && mouse->has_position) {
         if (relative && mouse->has_position) {
             mouse->x += xrel;
             mouse->x += xrel;