aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <weiss@jade.(none)>2008-08-13 11:37:40 +0100
committerThomas White <weiss@jade.(none)>2008-08-13 11:37:40 +0100
commitafce098eee6cc156fe3cc5e14026748c3a5a2271 (patch)
tree24afcfc5ad8464eef2cd8f5eb8133d1e3a38e7bf
parentc21dcf6c7fedc513967be6ca1046ae7d19de87fb (diff)
Render even when paused
-rw-r--r--src/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index de5917f..cf36adc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -255,10 +255,6 @@ int main(int argc, char *argv[]) {
if ( event.key.keysym.sym == SDLK_DOWN ) game->reverse = 0;
if ( event.key.keysym.sym == SDLK_p ) game->pause_rel = 1;
break;
- case SDL_VIDEOEXPOSE :
- /* Don't bother redrawing if not paused - not long to wait! */
- if ( game->paused ) render_draw(game);
- break;
case SDL_QUIT :
finished = 1;
break;
@@ -273,10 +269,13 @@ int main(int argc, char *argv[]) {
game->thrusting = 1;
mouse_thrust = 1;
}
+
+ /* Physics steps only happen when game is not paused */
if ( !game->paused ) {
physics_step(game, dt);
- render_draw(game);
}
+ /* Draw in any case */
+ render_draw(game);
if ( mouse_thrust ) game->thrusting = 0;