src/video/windx5/SDL_dx5video.c
changeset 442 b37ce4813ad4
parent 440 791d5ce383bc
child 443 778b970cec12
     1.1 --- a/src/video/windx5/SDL_dx5video.c	Sat Aug 17 19:17:01 2002 +0000
     1.2 +++ b/src/video/windx5/SDL_dx5video.c	Sat Aug 17 19:17:18 2002 +0000
     1.3 @@ -2205,6 +2205,16 @@
     1.4  #endif /* !IDirectDrawGammaControl_SetGammaRamp */
     1.5  }
     1.6  
     1.7 +static void FlushMessageQueue()
     1.8 +{
     1.9 +	MSG  msg;
    1.10 +	while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) ) {
    1.11 +		if ( msg.message == WM_QUIT ) break;
    1.12 +		TranslateMessage( &msg );
    1.13 +		DispatchMessage( &msg );
    1.14 +	}
    1.15 +}
    1.16 +
    1.17  void DX5_VideoQuit(_THIS)
    1.18  {
    1.19  	int i, j;
    1.20 @@ -2246,6 +2256,7 @@
    1.21  	DIB_QuitGamma(this);
    1.22  	if ( SDL_Window ) {
    1.23  		DX5_DestroyWindow(this);
    1.24 +		FlushMessageQueue();
    1.25  	}
    1.26  
    1.27  	/* Free our window icon */