changeset 5060:2170edcdfbd0

Fixed mouse button index for additional mouse buttons
author Sam Lantinga <slouken@libsdl.org>
date Thu, 20 Jan 2011 17:29:13 -0800
parents 00d1fef487c5
children 9e9940eae455
files src/video/cocoa/SDL_cocoaevents.m src/video/cocoa/SDL_cocoamouse.m
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoaevents.m	Fri Jan 21 00:25:08 2011 +0100
+++ b/src/video/cocoa/SDL_cocoaevents.m	Thu Jan 20 17:29:13 2011 -0800
@@ -201,8 +201,8 @@
         case NSLeftMouseDragged:
         case NSRightMouseDragged:
         case NSOtherMouseDragged: /* usually middle mouse dragged */
+        case NSMouseMoved:
         case NSScrollWheel:
-        case NSMouseMoved:
             Cocoa_HandleMouseEvent(_this, event);
             /* Pass through to NSApp to make sure everything stays in sync */
             [NSApp sendEvent:event];
--- a/src/video/cocoa/SDL_cocoamouse.m	Fri Jan 21 00:25:08 2011 +0100
+++ b/src/video/cocoa/SDL_cocoamouse.m	Thu Jan 20 17:29:13 2011 -0800
@@ -43,7 +43,7 @@
         case 2:
             return(SDL_BUTTON_MIDDLE); /* 2 */
     }
-    return button;
+    return button+1;
 }
 
 void