comparison src/events/SDL_events.c @ 353:d47637068e52

The documented error return value for SDL_WaitEvent() is 0.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 15 Apr 2002 04:53:41 +0000
parents b49fc922e7f6
children 5e31d8bfffcf
comparison
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 }