Mercurial > sdl-ios-xcode
diff src/video/windx5/SDL_dx5video.c @ 442:b37ce4813ad4
Flush message queue when shutting down video mode on Windows
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 17 Aug 2002 19:17:18 +0000 |
parents | 791d5ce383bc |
children | 778b970cec12 |
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5video.c Sat Aug 17 19:17:01 2002 +0000 +++ b/src/video/windx5/SDL_dx5video.c Sat Aug 17 19:17:18 2002 +0000 @@ -2205,6 +2205,16 @@ #endif /* !IDirectDrawGammaControl_SetGammaRamp */ } +static void FlushMessageQueue() +{ + MSG msg; + while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) ) { + if ( msg.message == WM_QUIT ) break; + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } +} + void DX5_VideoQuit(_THIS) { int i, j; @@ -2246,6 +2256,7 @@ DIB_QuitGamma(this); if ( SDL_Window ) { DX5_DestroyWindow(this); + FlushMessageQueue(); } /* Free our window icon */