Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SDL_ResetMouse was using a bogus mouse button, causing a "<< -1" shift.
Note that we got rid of SDL_ResetMouse() entirely for SDL 2.0, but for 1.2,
this is a small fix that doesn't otherwise alter behavior in any serious way.

Fixes Bugzilla #3593.
  • Loading branch information
icculus committed Jun 1, 2017
1 parent f1969cb commit 095451b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/SDL_mouse.c
Expand Up @@ -62,7 +62,7 @@ void SDL_MouseQuit(void)
void SDL_ResetMouse(void)
{
Uint8 i;
for ( i = 0; i < sizeof(SDL_ButtonState)*8; ++i ) {
for ( i = 1; i < sizeof(SDL_ButtonState)*8; ++i ) {
if ( SDL_ButtonState & SDL_BUTTON(i) ) {
SDL_PrivateMouseButton(SDL_RELEASED, i, 0, 0);
}
Expand Down

0 comments on commit 095451b

Please sign in to comment.