diff --git a/src/Utils.cpp b/src/Utils.cpp index 0ed47e7..0721616 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -59,12 +59,15 @@ void Utils::playlistModeNewSong() { fmod->m_backgroundMusicChannel->stop(); SongManager::get().pickRandomSong(); geode::log::info("is it over?"); - if (SongManager::get().getCalledOnce()) fmod->playMusic(SongManager::get().getCurrentSong(), true, 1.0f, 1); - else { + if (SongManager::get().getCalledOnce()) { + geode::log::info("playing song as normal"); + fmod->playMusic(SongManager::get().getCurrentSong(), true, 1.0f, 1); + } else { std::string lastSong = geode::Mod::get()->getSavedValue("lastMenuLoop"); - fmod->playMusic(lastSong, true, 1.0f, 1); + geode::log::info("playing song from saved value: {}", lastSong); SongManager::get().setCalledOnce(true); SongManager::get().setCurrentSong(lastSong); + fmod->playMusic(lastSong, true, 1.0f, 1); } } diff --git a/src/main.cpp b/src/main.cpp index 203fe63..e78b17d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,10 +76,12 @@ void populateVector(bool customSongs) { std::string lastMenuLoop = Mod::get()->getSavedValue("lastMenuLoop"); bool saveSongOnGameClose = Utils::getBool("saveSongOnGameClose"); bool loopExists = std::filesystem::exists(lastMenuLoop); - log::debug("\n=== 'REMEMBER LAST MENU LOOP' DEBUG INFO ===\nlast menu loop: {}\n'saveSongOnGameClose' setting: {}\nloopExists: {}", lastMenuLoop, saveSongOnGameClose, loopExists); + log::info("\n=== 'REMEMBER LAST MENU LOOP' DEBUG INFO ===\nlast menu loop: {}\n'saveSongOnGameClose' setting: {}\nloopExists: {}", lastMenuLoop, saveSongOnGameClose, loopExists); if (!lastMenuLoop.empty() && Utils::isSupportedExtension(lastMenuLoop) && loopExists && saveSongOnGameClose) { songManager.setCurrentSongToSavedSong(); - } else songManager.pickRandomSong(); + } else { + songManager.pickRandomSong(); + } if (!std::filesystem::exists(configDir / R"(store_your_disabled_menuloops_here)")) { std::filesystem::create_directory(configDir / R"(store_your_disabled_menuloops_here)");