From 37f103e2c27015dc311371d621097f0b3b523b70 Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Thu, 30 May 2024 15:13:35 -0500 Subject: [PATCH] restore old bg fallback behavior --- src/courtroom.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 9c916ea..f8becec 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -4527,7 +4527,21 @@ void Courtroom::set_scene(bool show_desk, const QString f_side) QPair bg_pair = ao_app->get_pos_path(f_side); QPair desk_pair = ao_app->get_pos_path(f_side, true); - ui_vp_background->loadAndPlayAnimation(bg_pair.first); + if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(bg_pair.first)))) + { + ui_vp_background->show(); + ui_vp_background->loadAndPlayAnimation(bg_pair.first); + } + else if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path("wit")))) + { + ui_vp_background->show(); + ui_vp_background->loadAndPlayAnimation(ao_app->get_image_suffix(ao_app->get_background_path("wit"))); + } + else + { + ui_vp_background->hide(); + } + if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(desk_pair.first)))) { ui_vp_desk->loadAndPlayAnimation(desk_pair.first);