src/events/SDL_events.c
changeset 1028 5ba65305c954
parent 769 b8d311d90021
child 1123 28ac87a38c17
     1.1 --- a/src/events/SDL_events.c	Wed Jan 12 19:38:24 2005 +0000
     1.2 +++ b/src/events/SDL_events.c	Thu Jan 13 23:24:56 2005 +0000
     1.3 @@ -91,7 +91,6 @@
     1.4  
     1.5  static int SDL_GobbleEvents(void *unused)
     1.6  {
     1.7 -	SDL_SetTimerThreaded(2);
     1.8  	event_thread = SDL_ThreadID();
     1.9  	while ( SDL_EventQ.active ) {
    1.10  		SDL_VideoDevice *video = current_video;
    1.11 @@ -114,7 +113,7 @@
    1.12  
    1.13  		/* Give up the CPU for the rest of our timeslice */
    1.14  		SDL_EventLock.safe = 1;
    1.15 -		if( SDL_timer_running ) {
    1.16 +		if ( SDL_timer_running ) {
    1.17  			SDL_ThreadedTimerCheck();
    1.18  		}
    1.19  		SDL_Delay(1);
    1.20 @@ -162,6 +161,8 @@
    1.21  		}
    1.22  		SDL_EventLock.safe = 0;
    1.23  
    1.24 +		/* The event thread will handle timers too */
    1.25 +		SDL_SetTimerThreaded(2);
    1.26  		SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL);
    1.27  		if ( SDL_EventThread == NULL ) {
    1.28  			return(-1);