Skip to content
Permalink
Browse files

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 095451bb9b51c131413f7ef860427f380d643088
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/events/SDL_mouse.c
@@ -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);
}

0 comments on commit 095451b

Please sign in to comment.