Mercurial > sdl-ios-xcode
comparison src/video/windx5/SDL_dx5events.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 | 4aac8563c296 |
children | 89f90f32f6c0 |
comparison
equal
deleted
inserted
replaced
1522:1078552c83a0 | 1523:21b1fbb53f4a |
---|---|
890 /* Initialize DirectInput */ | 890 /* Initialize DirectInput */ |
891 if ( DX5_DInputInit(this) < 0 ) { | 891 if ( DX5_DInputInit(this) < 0 ) { |
892 return(-1); | 892 return(-1); |
893 } | 893 } |
894 | 894 |
895 /* JC 14 Mar 2006 | |
896 Flush the message loop or this can cause big problems later | |
897 Especially if the user decides to use dialog boxes or assert()! | |
898 */ | |
899 WIN_FlushMessageQueue(); | |
900 | |
895 /* Ready to roll */ | 901 /* Ready to roll */ |
896 return(0); | 902 return(0); |
897 } | 903 } |
898 | 904 |
899 void DX5_DestroyWindow(_THIS) | 905 void DX5_DestroyWindow(_THIS) |
906 SetWindowLongPtr(SDL_Window, GWLP_WNDPROC, (LONG_PTR)userWindowProc); | 912 SetWindowLongPtr(SDL_Window, GWLP_WNDPROC, (LONG_PTR)userWindowProc); |
907 } else { | 913 } else { |
908 DestroyWindow(SDL_Window); | 914 DestroyWindow(SDL_Window); |
909 } | 915 } |
910 SDL_UnregisterApp(); | 916 SDL_UnregisterApp(); |
911 } | 917 |
918 /* JC 14 Mar 2006 | |
919 Flush the message loop or this can cause big problems later | |
920 Especially if the user decides to use dialog boxes or assert()! | |
921 */ | |
922 WIN_FlushMessageQueue(); | |
923 } |