From 8b3bcdc582553dbbc6278c252cbd8546bab46fdb Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 20 Jan 2011 17:33:06 -0800 Subject: [PATCH] Fixed mouse button index for additional mouse buttons --- src/video/cocoa/SDL_cocoawindow.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index e06bceac0..d1010d9e3 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -180,7 +180,7 @@ - (void)mouseDown:(NSEvent *)theEvent button = SDL_BUTTON_MIDDLE; break; default: - button = [theEvent buttonNumber]; + button = [theEvent buttonNumber] + 1; break; } SDL_SendMouseButton(_data->window, SDL_PRESSED, button); @@ -211,7 +211,7 @@ - (void)mouseUp:(NSEvent *)theEvent button = SDL_BUTTON_MIDDLE; break; default: - button = [theEvent buttonNumber]; + button = [theEvent buttonNumber] + 1; break; } SDL_SendMouseButton(_data->window, SDL_RELEASED, button);