Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed mouse button index for additional mouse buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 21, 2011
1 parent cd71aa7 commit 8b3bcdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8b3bcdc

Please sign in to comment.