mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
Retry login music playback when not playing
This commit is contained in:
parent
205db7d3b6
commit
071c8ead3b
2 changed files with 21 additions and 5 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "core/logger.hpp"
|
||||
#include "platform/process.hpp"
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
|
||||
namespace wowee {
|
||||
namespace audio {
|
||||
|
|
@ -75,6 +76,10 @@ void MusicManager::playMusic(const std::string& mpqPath, bool loop) {
|
|||
void MusicManager::playFilePath(const std::string& filePath, bool loop) {
|
||||
if (filePath.empty()) return;
|
||||
if (filePath == currentTrack && playing) return;
|
||||
if (!std::filesystem::exists(filePath)) {
|
||||
LOG_WARNING("Music: file not found: ", filePath);
|
||||
return;
|
||||
}
|
||||
|
||||
stopCurrentProcess();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue