Skip to content

Commit

Permalink
fix lead-in when starting paused
Browse files Browse the repository at this point in the history
  • Loading branch information
fmang committed Nov 11, 2017
1 parent 81ea84b commit 455e6fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ static void pause_game(struct oshu_game *game)

static void unpause_game(struct oshu_game *game)
{
oshu_play_audio(&game->audio);
if (game->clock.now >= 0)
oshu_play_audio(&game->audio);
game->paused = 0;
}

Expand Down Expand Up @@ -325,7 +326,7 @@ static void update_clock(struct oshu_game *game)
clock->now = clock->before + diff;
else
clock->now = clock->audio;
/* force monoticity */
/* force monotonicity */
if (clock->now < clock->before)
clock->now = clock->before;
}
Expand Down

0 comments on commit 455e6fe

Please sign in to comment.