From: Jason Woofenden Date: Sun, 26 Apr 2009 05:22:22 +0000 (-0400) Subject: stop busy-waiting while paused X-Git-Tag: 0.5.4~17 X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=commitdiff_plain;h=c706b99e3d67ab42bc19bc430b649944afbcb8e4;ds=sidebyside stop busy-waiting while paused --- diff --git a/main.c b/main.c index fe864bd..14a486b 100644 --- a/main.c +++ b/main.c @@ -638,7 +638,7 @@ gameloop() { autopilot(t_frame); } - while(SDL_PollEvent(&e)) { + while(paused ? SDL_WaitEvent(&e) : SDL_PollEvent(&e)) { switch(e.type) { case SDL_QUIT: return; case SDL_KEYDOWN: