Fix flickering screen after disconnect

Deleting the stream object has to be delayed until all Vulkan work is
done.
This commit is contained in:
Patrick Nicolas committed 2026-02-11 23:37:29 +01:00
1 parent a25ad615ae
commit e6dfb9fdb4
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -257,7 +257,7 @@ void scenes::lobby::gui_connected(XrTime predicted_display_time)
if (next_scene->apps.draw_gui(*imgui_ctx, _("Disconnect")) == app_launcher::Cancel)
{
next_scene.reset();
next_scene->exit();
current_tab = tab::server_list;
}
}
+1 -1
View File
@@ -769,7 +769,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
last_display_time = frame_state.predictedDisplayTime;
std::shared_lock lock(decoder_mutex);
if (not frame_state.shouldRender or (decoders[0].empty() and decoders[1].empty()))
if (not frame_state.shouldRender or (decoders[0].empty() and decoders[1].empty()) or exiting)
{
// TODO: stop/restart video stream
session.begin_frame();
+1 -1
View File
@@ -218,6 +218,7 @@ public:
return state_;
}
void exit();
bool alive() const
{
return !exiting;
@@ -236,7 +237,6 @@ private:
void setup(const to_headset::video_stream_description &);
void setup_reprojection_swapchain(uint32_t width, uint32_t height);
void exit();
vk::raii::QueryPool query_pool = nullptr;
bool query_pool_filled = false;