From a6a265b548ba5f7e4f982405cd3e76ff8026b9c0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 30 Oct 2022 00:42:45 +0200 Subject: Display notification if there's a problem with file selector. --- profiler/src/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index 0c8ef61e..4b80380d 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -965,5 +965,15 @@ static void DrawContents() ImGui::EndPopup(); } + if( tracy::Fileselector::HasFailed() ) ImGui::OpenPopup( "File selector is not available" ); + if( ImGui::BeginPopupModal( "File selector is not available", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) ) + { + ImGui::TextUnformatted( "File selector cannot be displayed." ); + ImGui::TextUnformatted( "Check nfd library implementation for details." ); + ImGui::Separator(); + if( ImGui::Button( "Ok" ) ) ImGui::CloseCurrentPopup(); + ImGui::EndPopup(); + } + bptr->EndFrame(); } -- cgit v1.2.3