diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index b4f2f791..e6e223ec 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -5925,7 +5925,7 @@ std::string Game::writemaingamesave(tinyxml2::XMLDocument& doc) //Special stats - if(music.nicefade==1) + if (music.nicefade) { xml::update_tag(msgs, "currentsong", music.nicechange); } @@ -6058,7 +6058,7 @@ bool Game::customsavequick(std::string savfile) //Special stats - if(music.nicefade==1) + if (music.nicefade) { xml::update_tag(msgs, "currentsong", music.nicechange ); } diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index d6a2843e..247893d6 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -137,7 +137,7 @@ void musicclass::init() currentsong = 0; nicechange = 0; - nicefade = 0; + nicefade = false; resumesong = 0; fadeoutqueuesong = -1; dontquickfade = false; @@ -282,10 +282,11 @@ void musicclass::processmusic() fadeoutqueuesong = -1; } - if (nicefade == 1 && Mix_PlayingMusic() == 0) + if (nicefade && Mix_PlayingMusic() == 0) { play(nicechange); - nicechange = -1; nicefade = 0; + nicechange = -1; + nicefade = false; } if(m_doFadeInVol) @@ -305,7 +306,7 @@ void musicclass::niceplay(int t) dontquickfade = true; fadeout(); } - nicefade = 1; + nicefade = true; nicechange = t; } } diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index 62b48f89..67f25677 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -37,7 +37,7 @@ public: bool safeToProcessMusic; int nicechange; - int nicefade; + bool nicefade; bool m_doFadeInVol; int FadeVolAmountPerFrame;