From 6e92ea4d29cfe3b2c8abe98088d16a34b8dc34c1 Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Sat, 19 Feb 2022 17:40:52 +0100 Subject: [PATCH] Fix for #6178 music resumes after minimizing on android (#6195) --- core/src/com/unciv/UncivGame.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 97eab9055c..a1634f772a 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -157,11 +157,13 @@ class UncivGame(parameters: UncivGameParameters) : Game() { // This is ALWAYS called after create() on Android - google "Android life cycle" override fun resume() { super.resume() + musicController.resume() if (!isInitialized) return // The stuff from Create() is still happening, so the main screen will load eventually } override fun pause() { if (isGameInfoInitialized()) GameSaver.autoSave(this.gameInfo) + musicController.pause() super.pause() }