From a49ca813e0308b78a61badd5dc1980a2553942de Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 13 Sep 2024 10:35:53 +0800 Subject: [PATCH] [fix] fix black screen after close the connection --- src/single_window/render.cpp | 7 ++++--- thirdparty/projectx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/single_window/render.cpp b/src/single_window/render.cpp index f16e1c9..7c34aac 100644 --- a/src/single_window/render.cpp +++ b/src/single_window/render.cpp @@ -503,8 +503,9 @@ int Render::Run() { ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Always); ImGui::SetNextWindowSize( ImVec2(main_window_width_, - streaming_ ? (fullscreen_button_pressed_ ? 0 : title_bar_height_) - : main_window_height_default_), + (connection_established_ && streaming_ && is_client_mode_) + ? (fullscreen_button_pressed_ ? 0 : title_bar_height_) + : main_window_height_default_), ImGuiCond_Always); ImGui::Begin("Render", nullptr, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | @@ -516,7 +517,7 @@ int Render::Run() { TitleBar(); } - if (streaming_ && is_client_mode_) { + if (connection_established_ && streaming_ && is_client_mode_) { if (!resizable_) { resizable_ = !resizable_; SDL_SetWindowResizable(main_window_, SDL_TRUE); diff --git a/thirdparty/projectx b/thirdparty/projectx index bbd05bc..c67ce33 160000 --- a/thirdparty/projectx +++ b/thirdparty/projectx @@ -1 +1 @@ -Subproject commit bbd05bcb8dad934834a3cd51b1af673ade52679b +Subproject commit c67ce332f6cf15fdbc3102a782c670718c18c40c