Add support for relative URLs in environments list

This commit is contained in:
Guillaume Meunier
2025-10-26 10:33:49 +01:00
parent 41abd36e33
commit b6b3a4da80
3 changed files with 54 additions and 15 deletions
+3
View File
@@ -979,6 +979,8 @@ void scenes::lobby::on_focused()
about_picture = imgui_ctx->load_texture("assets://" + image + ".ktx2");
default_environment_screenshot = imgui_ctx->load_texture("assets://default-environment.ktx2");
try
{
local_environments = load_environment_json(utils::read_whole_file<std::string>(application::get_config_path() / "environments.json"));
@@ -1039,6 +1041,7 @@ void scenes::lobby::on_unfocused()
renderer->wait_idle(); // Must be before the scene data because the renderer uses its descriptor sets
about_picture = 0;
default_environment_screenshot = 0;
local_environments.clear();
imgui_ctx.reset();