X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=3f4486bad1f818b9bbf079ad7adacab3a69d76bb;hp=60ee8f099c696ac34fe5514527ee7bde1dd5300c;hb=70c4e502a932ab902c9bda3231f83c841f279ee1;hpb=7981a2b8d152e6372aea8191f8c2197f866a450b diff --git a/main.c b/main.c index 60ee8f0..3f4486b 100644 --- a/main.c +++ b/main.c @@ -19,9 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef WIN32 -# include -#endif #include #include #include @@ -590,12 +587,15 @@ init_score_entry(void) void gameloop() { - Uint8 *keystate = SDL_GetKeyState(NULL); + SDL_Event e; + Uint8 *keystate; float tmp; for(;;) { - SDL_PumpEvents(); + while(SDL_PollEvent(&e)) { + if(e.type == SDL_QUIT) return; + } keystate = SDL_GetKeyState(NULL); if(!paused) { @@ -766,10 +766,7 @@ gameloop() { int main(int argc, char **argv) { - init_opts(); -#ifndef WIN32 - argp_parse(&argp, argc, argv, 0, 0, 0); -#endif + if(!parse_opts(argc, argv)) return 1; if(init()) { printf ("ta: '%s'\n",initerror);