src/events/SDL_mouse.c
changeset 9448 3d3ed3a5ba8d
parent 9334 5eb5ab33286e
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9447:728a4bf8e02f 9448:3d3ed3a5ba8d
   291         event.motion.y = mouse->y;
   291         event.motion.y = mouse->y;
   292         event.motion.xrel = xrel;
   292         event.motion.xrel = xrel;
   293         event.motion.yrel = yrel;
   293         event.motion.yrel = yrel;
   294         posted = (SDL_PushEvent(&event) > 0);
   294         posted = (SDL_PushEvent(&event) > 0);
   295     }
   295     }
   296     /* Use unclamped values if we're getting events outside the window */
   296     if (relative) {
   297     mouse->last_x = x;
   297         mouse->last_x = mouse->x;
   298     mouse->last_y = y;
   298         mouse->last_y = mouse->y;
       
   299     } else {
       
   300         /* Use unclamped values if we're getting events outside the window */
       
   301         mouse->last_x = x;
       
   302         mouse->last_y = y;
       
   303     }
   299     return posted;
   304     return posted;
   300 }
   305 }
   301 
   306 
   302 static SDL_MouseClickState *GetMouseClickState(SDL_Mouse *mouse, Uint8 button)
   307 static SDL_MouseClickState *GetMouseClickState(SDL_Mouse *mouse, Uint8 button)
   303 {
   308 {