src/events/SDL_mouse.c
changeset 518 300b46757b7a
parent 460 a888b3ae31ff
child 769 b8d311d90021
equal deleted inserted replaced
517:621ab54c1dde 518:300b46757b7a
    60 }
    60 }
    61 
    61 
    62 /* We lost the mouse, so post button up messages for all pressed buttons */
    62 /* We lost the mouse, so post button up messages for all pressed buttons */
    63 void SDL_ResetMouse(void)
    63 void SDL_ResetMouse(void)
    64 {
    64 {
    65 	int i;
    65 	Uint8 i;
    66 	for ( i = 0; i < sizeof(SDL_ButtonState)*8; ++i ) {
    66 	for ( i = 0; i < sizeof(SDL_ButtonState)*8; ++i ) {
    67 		if ( SDL_ButtonState & SDL_BUTTON(i) ) {
    67 		if ( SDL_ButtonState & SDL_BUTTON(i) ) {
    68 			SDL_PrivateMouseButton(SDL_RELEASED, i, 0, 0);
    68 			SDL_PrivateMouseButton(SDL_RELEASED, i, 0, 0);
    69 		}
    69 		}
    70 	}
    70 	}