diff test/threadwin.c @ 5125:dc0dfdd58f27

Removed completely non-portable event thread hack. Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Jan 2011 22:44:08 -0800
parents faa9fc8e7f67
children
line wrap: on
line diff
--- a/test/threadwin.c	Thu Jan 27 20:51:54 2011 -0800
+++ b/test/threadwin.c	Thu Jan 27 22:44:08 2011 -0800
@@ -241,16 +241,7 @@
     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 @@
 
     /* 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;
         }