comparison src/video/cocoa/SDL_cocoawindow.m @ 5061:9e9940eae455

Fixed mouse button index for additional mouse buttons
author Sam Lantinga <slouken@libsdl.org>
date Thu, 20 Jan 2011 17:33:06 -0800
parents 00d1fef487c5
children 58265e606e4e
comparison
equal deleted inserted replaced
5060:2170edcdfbd0 5061:9e9940eae455
178 break; 178 break;
179 case 2: 179 case 2:
180 button = SDL_BUTTON_MIDDLE; 180 button = SDL_BUTTON_MIDDLE;
181 break; 181 break;
182 default: 182 default:
183 button = [theEvent buttonNumber]; 183 button = [theEvent buttonNumber] + 1;
184 break; 184 break;
185 } 185 }
186 SDL_SendMouseButton(_data->window, SDL_PRESSED, button); 186 SDL_SendMouseButton(_data->window, SDL_PRESSED, button);
187 } 187 }
188 188
209 break; 209 break;
210 case 2: 210 case 2:
211 button = SDL_BUTTON_MIDDLE; 211 button = SDL_BUTTON_MIDDLE;
212 break; 212 break;
213 default: 213 default:
214 button = [theEvent buttonNumber]; 214 button = [theEvent buttonNumber] + 1;
215 break; 215 break;
216 } 216 }
217 SDL_SendMouseButton(_data->window, SDL_RELEASED, button); 217 SDL_SendMouseButton(_data->window, SDL_RELEASED, button);
218 } 218 }
219 219