src/events/SDL_events.c
changeset 353 d47637068e52
parent 352 b49fc922e7f6
child 383 5e31d8bfffcf
equal deleted inserted replaced
352:b49fc922e7f6 353:d47637068e52
   381 int SDL_WaitEvent (SDL_Event *event)
   381 int SDL_WaitEvent (SDL_Event *event)
   382 {
   382 {
   383 	while ( 1 ) {
   383 	while ( 1 ) {
   384 		SDL_PumpEvents();
   384 		SDL_PumpEvents();
   385 		switch(SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_ALLEVENTS)) {
   385 		switch(SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_ALLEVENTS)) {
   386 		    case -1: return -1; 
   386 		    case -1: return 0;
   387 		    case 1: return 1;
   387 		    case 1: return 1;
   388 		    case 0: SDL_Delay(10);
   388 		    case 0: SDL_Delay(10);
   389 		}
   389 		}
   390 	}
   390 	}
   391 }
   391 }