From 95c9d322983450d3e60841a29161c9d3bddd5cae Mon Sep 17 00:00:00 2001 From: "Erymanthus[#5074] | (u/)RayDeeUx" <51521765+RayDeeUx@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:41:54 -0400 Subject: [PATCH] sike Signed-off-by: Erymanthus[#5074] | (u/)RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> --- src/SongManager.cpp | 1 - src/Utils.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SongManager.cpp b/src/SongManager.cpp index 044e6ff..163b475 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -32,7 +32,6 @@ void SongManager::pickRandomSong() { } std::string SongManager::getCurrentSong() { - geode::Mod::get()->setSavedValue("lastMenuLoop", m_currentSong); return m_currentSong; } diff --git a/src/Utils.cpp b/src/Utils.cpp index 0721616..8e17bba 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -47,6 +47,7 @@ void Utils::setNewSong() { } FMODAudioEngine::sharedEngine()->m_backgroundMusicChannel->stop(); SongManager::get().pickRandomSong(); + geode::Mod::get()->setSavedValue("lastMenuLoop", SongManager::get().getCurrentSong()); GameManager::sharedState()->playMenuMusic(); } @@ -62,6 +63,7 @@ void Utils::playlistModeNewSong() { if (SongManager::get().getCalledOnce()) { geode::log::info("playing song as normal"); fmod->playMusic(SongManager::get().getCurrentSong(), true, 1.0f, 1); + geode::Mod::get()->setSavedValue("lastMenuLoop", SongManager::get().getCurrentSong()); } else { std::string lastSong = geode::Mod::get()->getSavedValue("lastMenuLoop"); geode::log::info("playing song from saved value: {}", lastSong);