Fixed mouse button index for additional mouse buttons
authorSam Lantinga <slouken@libsdl.org>
Thu, 20 Jan 2011 17:33:06 -0800
changeset 5061 9e9940eae455
parent 5060 2170edcdfbd0
child 5062 e8916fe9cfc8
Fixed mouse button index for additional mouse buttons
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Thu Jan 20 17:29:13 2011 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Thu Jan 20 17:33:06 2011 -0800
@@ -180,7 +180,7 @@
         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 @@
         button = SDL_BUTTON_MIDDLE;
         break;
     default:
-        button = [theEvent buttonNumber];
+        button = [theEvent buttonNumber] + 1;
         break;
     }
     SDL_SendMouseButton(_data->window, SDL_RELEASED, button);