Mercurial > sdl-ios-xcode
comparison src/video/windib/SDL_dibevents.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 | 0a2bd6507477 |
children | 89f90f32f6c0 |
comparison
equal
deleted
inserted
replaced
1522:1078552c83a0 | 1523:21b1fbb53f4a |
---|---|
436 SDL_SetError("Couldn't create window"); | 436 SDL_SetError("Couldn't create window"); |
437 return(-1); | 437 return(-1); |
438 } | 438 } |
439 ShowWindow(SDL_Window, SW_HIDE); | 439 ShowWindow(SDL_Window, SW_HIDE); |
440 } | 440 } |
441 | |
442 /* JC 14 Mar 2006 | |
443 Flush the message loop or this can cause big problems later | |
444 Especially if the user decides to use dialog boxes or assert()! | |
445 */ | |
446 WIN_FlushMessageQueue(); | |
447 | |
441 return(0); | 448 return(0); |
442 } | 449 } |
443 | 450 |
444 void DIB_DestroyWindow(_THIS) | 451 void DIB_DestroyWindow(_THIS) |
445 { | 452 { |
447 SetWindowLongPtr(SDL_Window, GWLP_WNDPROC, (LONG_PTR)userWindowProc); | 454 SetWindowLongPtr(SDL_Window, GWLP_WNDPROC, (LONG_PTR)userWindowProc); |
448 } else { | 455 } else { |
449 DestroyWindow(SDL_Window); | 456 DestroyWindow(SDL_Window); |
450 } | 457 } |
451 SDL_UnregisterApp(); | 458 SDL_UnregisterApp(); |
452 } | 459 |
460 /* JC 14 Mar 2006 | |
461 Flush the message loop or this can cause big problems later | |
462 Especially if the user decides to use dialog boxes or assert()! | |
463 */ | |
464 WIN_FlushMessageQueue(); | |
465 } |