From e9f63f2556fc59c0ea12298bc974b3b2e48628bf Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 18 Apr 2020 11:47:28 +0300 Subject: [PATCH] Merge "Fixed: Restore playlist after charselect" --- ryzom/client/src/interface_v3/interface_manager.cpp | 4 ++++ ryzom/client/src/release.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ryzom/client/src/interface_v3/interface_manager.cpp b/ryzom/client/src/interface_v3/interface_manager.cpp index 50acc2308..23440218e 100644 --- a/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1044,6 +1044,10 @@ void CInterfaceManager::initInGame() gc->setTarget(gc->getSavedTarget()); } + // rebuild mp3 player playlist if user reselected a char (songs are already scanned) + CAHManager::getInstance()->runActionHandler("music_player", NULL, "update_playlist"); + CAHManager::getInstance()->runActionHandler("music_player", NULL, "stop"); + CCDBNodeLeaf *node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHATLOG_STATE", false); if (node) { diff --git a/ryzom/client/src/release.cpp b/ryzom/client/src/release.cpp index 0477acce9..889bcee11 100644 --- a/ryzom/client/src/release.cpp +++ b/ryzom/client/src/release.cpp @@ -240,8 +240,8 @@ void releaseMainLoopReselect() // alredy called from farTPMainLoop() // --R2::getEditor().autoConfigRelease(IsInRingSession); - // Pause any user played music - MusicPlayer.pause(); + // stop any user played music + MusicPlayer.stop(); // only really needed at exit // --STRING_MANAGER::CStringManagerClient::instance()->flushStringCache(); @@ -390,8 +390,8 @@ void releaseMainLoop(bool closeConnection) // Release R2 editor if applicable R2::getEditor().autoConfigRelease(IsInRingSession); - // Pause any user played music - MusicPlayer.pause(); + // stop any user played music + MusicPlayer.stop(); // flush the server string cache STRING_MANAGER::CStringManagerClient::instance()->flushStringCache();