From bf3838f84a9be4ea606a462e84a9ae4af2a30f64 Mon Sep 17 00:00:00 2001 From: Storm dragon Date: Wed, 30 Dec 2015 17:03:30 -0500 Subject: [PATCH] Finally got pausing for intro working correctly. --- bottleblaster/bottleblaster.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bottleblaster/bottleblaster.lua b/bottleblaster/bottleblaster.lua index 9273031..7bf9379 100644 --- a/bottleblaster/bottleblaster.lua +++ b/bottleblaster/bottleblaster.lua @@ -78,10 +78,9 @@ end local function game_intro() local sound = trySDL(mixer.loadWAV, "sounds/game-intro.ogg") sound:playChannel(-1, 0) - -- It would be better if the SDL.delay could calculate the link of the intro sound and use that instead of 4 * 1000 - -- while sound.sfxIsPlaying(-1) do - SDL.delay(5000) - -- end + while mixer.playing(-1) > 0 do + SDL.delay(100) + end end -- Game variables