src/events/SDL_mouse.c
changeset 460 a888b3ae31ff
parent 297 f6ffac90895c
child 518 300b46757b7a
     1.1 --- a/src/events/SDL_mouse.c	Tue Aug 20 05:59:31 2002 +0000
     1.2 +++ b/src/events/SDL_mouse.c	Tue Aug 20 06:01:20 2002 +0000
     1.3 @@ -59,6 +59,17 @@
     1.4  	return(0);
     1.5  }
     1.6  
     1.7 +/* We lost the mouse, so post button up messages for all pressed buttons */
     1.8 +void SDL_ResetMouse(void)
     1.9 +{
    1.10 +	int i;
    1.11 +	for ( i = 0; i < sizeof(SDL_ButtonState)*8; ++i ) {
    1.12 +		if ( SDL_ButtonState & SDL_BUTTON(i) ) {
    1.13 +			SDL_PrivateMouseButton(SDL_RELEASED, i, 0, 0);
    1.14 +		}
    1.15 +	}
    1.16 +}
    1.17 +
    1.18  Uint8 SDL_GetMouseState (int *x, int *y)
    1.19  {
    1.20  	if ( x )