JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
stop busy-waiting while paused
authorJason Woofenden <jason283@herkamire.com>
Sun, 26 Apr 2009 05:22:22 +0000 (01:22 -0400)
committerJason Woofenden <jason283@herkamire.com>
Sun, 26 Apr 2009 05:22:22 +0000 (01:22 -0400)
main.c

diff --git a/main.c b/main.c
index fe864bd..14a486b 100644 (file)
--- 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: