Fixed mouse button index for additional mouse buttons
authorSam Lantinga <slouken@libsdl.org>
Thu, 20 Jan 2011 17:33:06 -0800
changeset 50619e9940eae455
parent 5060 2170edcdfbd0
child 5062 e8916fe9cfc8
Fixed mouse button index for additional mouse buttons
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Thu Jan 20 17:29:13 2011 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Thu Jan 20 17:33:06 2011 -0800
     1.3 @@ -180,7 +180,7 @@
     1.4          button = SDL_BUTTON_MIDDLE;
     1.5          break;
     1.6      default:
     1.7 -        button = [theEvent buttonNumber];
     1.8 +        button = [theEvent buttonNumber] + 1;
     1.9          break;
    1.10      }
    1.11      SDL_SendMouseButton(_data->window, SDL_PRESSED, button);
    1.12 @@ -211,7 +211,7 @@
    1.13          button = SDL_BUTTON_MIDDLE;
    1.14          break;
    1.15      default:
    1.16 -        button = [theEvent buttonNumber];
    1.17 +        button = [theEvent buttonNumber] + 1;
    1.18          break;
    1.19      }
    1.20      SDL_SendMouseButton(_data->window, SDL_RELEASED, button);