src/video/cocoa/SDL_cocoamouse.m
changeset 6950 1ddb72193079
parent 6885 700f1b25f77f
child 7037 3fedf1f25b94
     1.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Sat Mar 02 17:51:32 2013 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Sat Mar 02 20:44:16 2013 -0800
     1.3 @@ -223,13 +223,15 @@
     1.4           [event type] == NSOtherMouseDragged)) {
     1.5          float x = [event deltaX];
     1.6          float y = [event deltaY];
     1.7 -        SDL_SendMouseMotion(mouse->focus, 1, (int)x, (int)y);
     1.8 +        SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, (int)x, (int)y);
     1.9      }
    1.10  }
    1.11  
    1.12  void
    1.13  Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event)
    1.14  {
    1.15 +    SDL_Mouse *mouse = SDL_GetMouse();
    1.16 +
    1.17      float x = [event deltaX];
    1.18      float y = [event deltaY];
    1.19  
    1.20 @@ -243,7 +245,7 @@
    1.21      } else if (y < 0) {
    1.22          y -= 0.9f;
    1.23      }
    1.24 -    SDL_SendMouseWheel(window, (int)x, (int)y);
    1.25 +    SDL_SendMouseWheel(window, mouse->mouseID, (int)x, (int)y);
    1.26  }
    1.27  
    1.28  void