From 45c40bae170985152e72a626e9f642c8e60670dc Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Wed, 13 May 2026 00:44:19 +0200 Subject: [PATCH] Fix for ImGui 1.92.8 PathStroke arg swap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gate the PathStroke call on IMGUI_VERSION_NUM < 19276 — last two args (flags, thickness) were swapped to (thickness, flags) in ocornut/imgui v1.92.8. --- ImFileDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ImFileDialog.cpp b/ImFileDialog.cpp index 81e04b1..03fb164 100644 --- a/ImFileDialog.cpp +++ b/ImFileDialog.cpp @@ -274,7 +274,11 @@ namespace ifd { float radius = i & 1 ? innerRadius : outerRadius; window->DrawList->PathLineTo(ImVec2(center.x + radius * sin(i * angle), center.y - radius * cos(i * angle))); } +#if IMGUI_VERSION_NUM < 19276 window->DrawList->PathStroke(ImGui::ColorConvertFloat4ToU32(ImGui::GetStyle().Colors[ImGuiCol_Text]), true, 2.0f); +#else + window->DrawList->PathStroke(ImGui::ColorConvertFloat4ToU32(ImGui::GetStyle().Colors[ImGuiCol_Text]), 2.0f, ImDrawFlags_Closed); +#endif return ret; }