Send app icons one by one

This commit is contained in:
Guillaume Meunier
2025-08-08 20:41:46 +02:00
parent 669b06e982
commit 1b78180d73
8 changed files with 91 additions and 47 deletions
+3 -3
View File
@@ -400,7 +400,7 @@ void scenes::lobby::gui_connected()
auto apps = next_scene->get_applications();
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {20, 20});
if (apps->applications.empty())
if (apps->empty())
{
CenterTextHV(_("Start an application on the server to start streaming."));
}
@@ -426,7 +426,7 @@ void scenes::lobby::gui_connected()
ImGui::Indent((usable_window_width - icon_line_width) / 2);
auto t0 = std::chrono::steady_clock::now();
for (const auto [index, app]: utils::enumerate(apps->applications))
for (const auto [index, app]: utils::enumerate(*apps))
{
ImTextureID texture = [&]() -> ImTextureID {
if (app.image.empty())
@@ -470,7 +470,7 @@ void scenes::lobby::gui_connected()
std::vector<std::pair<std::string, ImTextureID>> to_be_removed;
for (const auto & [app_id, app_icon]: app_icons)
{
if (not std::ranges::contains(apps->applications, app_id, &to_headset::application_list::application::id))
if (not std::ranges::contains(*apps, app_id, &scenes::stream::app::id))
to_be_removed.emplace_back(app_id, app_icon);
}
for (const auto & [app_id, app_icon]: to_be_removed)