From 455e6fe73ab5940cd4bf544cfbc0a8ef961784d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano-Tarumi?= Date: Sat, 11 Nov 2017 11:00:31 +0100 Subject: [PATCH] fix lead-in when starting paused --- src/game/game.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/game.c b/src/game/game.c index 8722a3c..82f9418 100644 --- a/src/game/game.c +++ b/src/game/game.c @@ -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; } @@ -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; }