diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index 5e968e3c..361005c8 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -428,7 +428,7 @@ void musicclass::processmusic(void) } /* This needs to come after processing fades */ - if (nicefade && Mix_PausedMusic() == 1) + if (nicefade && halted()) { play(nicechange); nicechange = -1; @@ -554,3 +554,8 @@ void musicclass::resumeef(void) { Mix_Resume(-1); } + +bool musicclass::halted(void) +{ + return Mix_PausedMusic() == 1; +} diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index 84975afd..87707170 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -44,6 +44,8 @@ public: void pauseef(void); void resumeef(void); + bool halted(void); + std::vector soundTracks; std::vector musicTracks; SoundSystem soundSystem;