src/video/cocoa/SDL_cocoamouse.m
changeset 5477 50cd1fb880e5
parent 5419 210b0abe9e44
child 5535 96594ac5fd1a
     1.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Fri Mar 11 14:30:00 2011 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Fri Mar 11 16:03:23 2011 -0800
     1.3 @@ -168,7 +168,11 @@
     1.4  {
     1.5      SDL_Mouse *mouse = SDL_GetMouse();
     1.6  
     1.7 -    if (mouse->relative_mode && [event type] == NSMouseMoved) {
     1.8 +    if (mouse->relative_mode &&
     1.9 +        ([event type] == NSMouseMoved ||
    1.10 +         [event type] == NSLeftMouseDragged ||
    1.11 +         [event type] == NSRightMouseDragged ||
    1.12 +         [event type] == NSOtherMouseDragged)) {
    1.13          float x = [event deltaX];
    1.14          float y = [event deltaY];
    1.15          SDL_SendMouseMotion(mouse->focus, 1, (int)x, (int)y);