Fixed mouse button index for additional mouse buttons
authorSam Lantinga <slouken@libsdl.org>
Thu, 20 Jan 2011 17:29:13 -0800
changeset 50602170edcdfbd0
parent 5059 00d1fef487c5
child 5061 9e9940eae455
Fixed mouse button index for additional mouse buttons
src/video/cocoa/SDL_cocoaevents.m
src/video/cocoa/SDL_cocoamouse.m
     1.1 --- a/src/video/cocoa/SDL_cocoaevents.m	Fri Jan 21 00:25:08 2011 +0100
     1.2 +++ b/src/video/cocoa/SDL_cocoaevents.m	Thu Jan 20 17:29:13 2011 -0800
     1.3 @@ -201,8 +201,8 @@
     1.4          case NSLeftMouseDragged:
     1.5          case NSRightMouseDragged:
     1.6          case NSOtherMouseDragged: /* usually middle mouse dragged */
     1.7 +        case NSMouseMoved:
     1.8          case NSScrollWheel:
     1.9 -        case NSMouseMoved:
    1.10              Cocoa_HandleMouseEvent(_this, event);
    1.11              /* Pass through to NSApp to make sure everything stays in sync */
    1.12              [NSApp sendEvent:event];
     2.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Fri Jan 21 00:25:08 2011 +0100
     2.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Thu Jan 20 17:29:13 2011 -0800
     2.3 @@ -43,7 +43,7 @@
     2.4          case 2:
     2.5              return(SDL_BUTTON_MIDDLE); /* 2 */
     2.6      }
     2.7 -    return button;
     2.8 +    return button+1;
     2.9  }
    2.10  
    2.11  void