mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Avoid hardcoded login video path
This commit is contained in:
parent
2613b09d2c
commit
44b03a06a0
1 changed files with 5 additions and 1 deletions
|
|
@ -45,7 +45,11 @@ void AuthScreen::render(auth::AuthHandler& authHandler) {
|
|||
|
||||
if (!videoInitAttempted) {
|
||||
videoInitAttempted = true;
|
||||
backgroundVideo.open("assets/startscreen.mp4");
|
||||
std::string videoPath = "assets/startscreen.mp4";
|
||||
if (!std::filesystem::exists(videoPath)) {
|
||||
videoPath = (std::filesystem::current_path() / "assets/startscreen.mp4").string();
|
||||
}
|
||||
backgroundVideo.open(videoPath);
|
||||
}
|
||||
backgroundVideo.update(ImGui::GetIO().DeltaTime);
|
||||
if (backgroundVideo.isReady()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue