From cd71aa701a9ce7253ec3b069004f520af1ab1f38 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 20 Jan 2011 17:29:13 -0800 Subject: [PATCH] Fixed mouse button index for additional mouse buttons --- src/video/cocoa/SDL_cocoaevents.m | 2 +- src/video/cocoa/SDL_cocoamouse.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index 8a94e0d60..57532a46c 100644 --- a/src/video/cocoa/SDL_cocoaevents.m +++ b/src/video/cocoa/SDL_cocoaevents.m @@ -201,8 +201,8 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged: /* usually middle mouse dragged */ - case NSScrollWheel: case NSMouseMoved: + case NSScrollWheel: Cocoa_HandleMouseEvent(_this, event); /* Pass through to NSApp to make sure everything stays in sync */ [NSApp sendEvent:event]; diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index fd8b74a3b..a041c09cf 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -43,7 +43,7 @@ case 2: return(SDL_BUTTON_MIDDLE); /* 2 */ } - return button; + return button+1; } void