diff --git a/main.lua b/main.lua index 5510529..e0f43bc 100644 --- a/main.lua +++ b/main.lua @@ -20,7 +20,7 @@ function love.load() if not config.sfx_volume then config.sfx_volume = 0.5 end if not config.bgm_volume then config.bgm_volume = 0.5 end - if config.secret == nil then config.secret = false + if config.secret == nil then config.secret = false elseif config.secret == true then playSE("welcome") end if not config.gamesettings then @@ -251,7 +251,7 @@ function love.joystickhat(joystick, hat, direction) end function love.focus(f) - if f then + if f and (scene.title ~= "Game" or not scene.paused) then resumeBGM() else pauseBGM() diff --git a/scene/game.lua b/scene/game.lua index 685a587..724297b 100644 --- a/scene/game.lua +++ b/scene/game.lua @@ -87,9 +87,9 @@ function GameScene:onInputPress(e) elseif e.input == "retry" then scene = GameScene(self.retry_mode, self.retry_ruleset) elseif e.input == "pause" and not (self.game.game_over or self.game.completed) then - if not self.paused then pauseBGM() - else resumeBGM() end self.paused = not self.paused + if self.paused then pauseBGM() + else resumeBGM() end elseif e.input == "menu_back" then scene = ModeSelectScene() elseif e.input and string.sub(e.input, 1, 5) ~= "menu_" then