Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed bug 1166 (No mouse motion events while SDL_SetRelativeMouseMode…

…() is active and holding the mouse button)
  • Loading branch information
slouken committed Mar 12, 2011
1 parent b792f15 commit 80077bb5a83606101d9b0897365d04dcd13e43f0
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/video/cocoa/SDL_cocoamouse.m
@@ -168,7 +168,11 @@
{
SDL_Mouse *mouse = SDL_GetMouse();

if (mouse->relative_mode && [event type] == NSMouseMoved) {
if (mouse->relative_mode &&
([event type] == NSMouseMoved ||
[event type] == NSLeftMouseDragged ||
[event type] == NSRightMouseDragged ||
[event type] == NSOtherMouseDragged)) {
float x = [event deltaX];
float y = [event deltaY];
SDL_SendMouseMotion(mouse->focus, 1, (int)x, (int)y);

0 comments on commit 80077bb

Please sign in to comment.