Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_sysevents.c @ 1523:21b1fbb53f4a
(patch tweaked a bit)
Date: Tue, 14 Mar 2006 03:30:11 +0000
From: Peter Mulholland
Subject: [SDL] Windows MessageBox() strangeness fixes
Hello all,
I *think* this should fix the issues that people were seeing with
MessageBox() not working and therefore assert() on mingw/msvc. Forgive
me if i've screwed up making the diff file - I'm a total newb when it
comes to things like CVS and diff.
It modifies a few files as I saw that FlushMessageQueue() was in both
the windx5 and windib driver, so I moved this into wincommon. It was
also in the gapi driver, so I changed that too. The function is now
WIN_FlushMessageQueue() in src/video/wincommon/SDL_syswm.c
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 14 Mar 2006 04:00:03 +0000 |
parents | 4d005dfbb7f5 |
children | e49147870aac c121d94672cb 203695f768e0 |
comparison
equal
deleted
inserted
replaced
1522:1078552c83a0 | 1523:21b1fbb53f4a |
---|---|
166 break; | 166 break; |
167 } | 167 } |
168 } | 168 } |
169 | 169 |
170 #endif | 170 #endif |
171 | |
172 /* JC 14 Mar 2006 | |
173 This is used all over the place, in the windib driver and in the dx5 driver | |
174 So we may as well stick it here instead of having multiple copies scattered | |
175 about | |
176 */ | |
177 void WIN_FlushMessageQueue() | |
178 { | |
179 MSG msg; | |
180 while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) ) { | |
181 if ( msg.message == WM_QUIT ) break; | |
182 TranslateMessage( &msg ); | |
183 DispatchMessage( &msg ); | |
184 } | |
185 } | |
171 | 186 |
172 static void SDL_RestoreGameMode(void) | 187 static void SDL_RestoreGameMode(void) |
173 { | 188 { |
174 #ifdef _WIN32_WCE | 189 #ifdef _WIN32_WCE |
175 SDL_VideoDevice *this = current_video; | 190 SDL_VideoDevice *this = current_video; |