Skip to content

Commit

Permalink
fix bug with wrong behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Erymanthus[#5074] | (u/)RayDeeUx <[email protected]>
  • Loading branch information
RayDeeUx committed Sep 4, 2024
1 parent 95c9d32 commit ecb5238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ void Utils::playlistModeNewSong() {
fmod->m_backgroundMusicChannel->stop();
SongManager::get().pickRandomSong();
geode::log::info("is it over?");
if (SongManager::get().getCalledOnce()) {
if (SongManager::get().getCalledOnce() || !Utils::getBool("saveSongOnGameClose")) {
geode::log::info("playing song as normal");
fmod->playMusic(SongManager::get().getCurrentSong(), true, 1.0f, 1);
geode::Mod::get()->setSavedValue<std::string>("lastMenuLoop", SongManager::get().getCurrentSong());
} else {
std::string lastSong = geode::Mod::get()->getSavedValue<std::string>("lastMenuLoop");
geode::log::info("playing song from saved value: {}", lastSong);
SongManager::get().setCalledOnce(true);
SongManager::get().setCurrentSong(lastSong);
fmod->playMusic(lastSong, true, 1.0f, 1);
}
SongManager::get().setCalledOnce(true);
}

// create notif card stuff
Expand Down

0 comments on commit ecb5238

Please sign in to comment.