Make Tennix buildable on the MacOSX platform (Tennix.app)
[tennix.git] / input.c
blob980758d17a83656e6efcc0cdb2108118f0762e1b
1 #include "tennix.h"
2 #include "input.h"
4 void wait_keypress() {
5 SDL_Event e;
6 unsigned char done = 0;
8 SDL_Delay( 100);
10 /* clean up all events */
11 while( SDL_PollEvent( &e));
13 while( !done) {
14 if( SDL_PollEvent( &e)) {
15 done = (e.type == SDL_KEYUP || e.type == SDL_MOUSEBUTTONUP);
16 } else {
17 SDL_Delay( 50);