mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Use absolute tavern music path fallback
This commit is contained in:
parent
071c8ead3b
commit
400e8652d4
1 changed files with 5 additions and 2 deletions
|
|
@ -93,10 +93,13 @@ void AuthScreen::render(auth::AuthHandler& authHandler) {
|
||||||
if (music) {
|
if (music) {
|
||||||
music->update(ImGui::GetIO().DeltaTime);
|
music->update(ImGui::GetIO().DeltaTime);
|
||||||
if (!music->isPlaying()) {
|
if (!music->isPlaying()) {
|
||||||
std::string path = "assets/20-taverns.mp3";
|
std::string path = "/home/k/Desktop/wowee/assets/20-taverns.mp3";
|
||||||
|
if (!std::filesystem::exists(path)) {
|
||||||
|
path = "assets/20-taverns.mp3";
|
||||||
if (!std::filesystem::exists(path)) {
|
if (!std::filesystem::exists(path)) {
|
||||||
path = (std::filesystem::current_path() / "assets/20-taverns.mp3").string();
|
path = (std::filesystem::current_path() / "assets/20-taverns.mp3").string();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
music->playFilePath(path, true);
|
music->playFilePath(path, true);
|
||||||
musicPlaying = music->isPlaying();
|
musicPlaying = music->isPlaying();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue