Skip to content

Commit

Permalink
sike
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 75aa72e commit 95c9d32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/SongManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ void SongManager::pickRandomSong() {
}

std::string SongManager::getCurrentSong() {
geode::Mod::get()->setSavedValue<std::string>("lastMenuLoop", m_currentSong);
return m_currentSong;
}

Expand Down
2 changes: 2 additions & 0 deletions src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void Utils::setNewSong() {
}
FMODAudioEngine::sharedEngine()->m_backgroundMusicChannel->stop();
SongManager::get().pickRandomSong();
geode::Mod::get()->setSavedValue<std::string>("lastMenuLoop", SongManager::get().getCurrentSong());
GameManager::sharedState()->playMenuMusic();
}

Expand All @@ -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<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);
Expand Down

0 comments on commit 95c9d32

Please sign in to comment.