From 36187626a9a87eaa3e700c72ee0c6bbac24e6439 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 18 Apr 2020 11:47:28 +0300 Subject: [PATCH] Fixed: Restore playlist after charselect --- code/ryzom/client/src/interface_v3/interface_manager.cpp | 4 ++++ code/ryzom/client/src/release.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index f8637bff3..e81785ea8 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/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/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index 0477acce9..889bcee11 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/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();