Removed completely non-portable event thread hack.

Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
This commit is contained in:
Sam Lantinga 2011-01-27 22:44:08 -08:00
parent 95dbe47cf3
commit c3daf0f0cd
16 changed files with 44 additions and 227 deletions

View file

@ -241,16 +241,7 @@ main(int argc, char *argv[])
video_flags = SDL_SWSURFACE;
parsed = 1;
while (parsed) {
/* If the threaded option is enabled, and the SDL library hasn't
been compiled with threaded events enabled, then the mouse and
keyboard won't respond.
*/
if ((argc >= 2) && (strcmp(argv[1], "-threaded") == 0)) {
init_flags |= SDL_INIT_EVENTTHREAD;
argc -= 1;
argv += 1;
printf("Running with threaded events\n");
} else if ((argc >= 2) && (strcmp(argv[1], "-fullscreen") == 0)) {
if ((argc >= 2) && (strcmp(argv[1], "-fullscreen") == 0)) {
video_flags |= SDL_FULLSCREEN;
argc -= 1;
argv += 1;
@ -320,9 +311,8 @@ main(int argc, char *argv[])
/* Loop, waiting for QUIT */
while (!done) {
if (!(init_flags & SDL_INIT_EVENTTHREAD)) {
SDL_PumpEvents(); /* Needed when event thread is off */
}
SDL_PumpEvents();
if (SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, SDL_QUIT, SDL_QUIT)) {
done = 1;
}