Fixed mouse button index for additional mouse buttons

This commit is contained in:
Sam Lantinga 2011-01-20 17:33:06 -08:00
parent 06050f8b15
commit ee1f71dd63

View file

@ -180,7 +180,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
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 @@ static __inline__ void ConvertNSRect(NSRect *r)
button = SDL_BUTTON_MIDDLE;
break;
default:
button = [theEvent buttonNumber];
button = [theEvent buttonNumber] + 1;
break;
}
SDL_SendMouseButton(_data->window, SDL_RELEASED, button);