From 269c9352d5eef3dd72d63ccf0fbcb5fbf4e09c36 Mon Sep 17 00:00:00 2001 From: Arnaud Loonstra Date: Sat, 6 Apr 2024 10:22:39 +0200 Subject: [PATCH 1/2] update deprecated methods --- ImFileDialog.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ImFileDialog.cpp b/ImFileDialog.cpp index 53832d9..601aa50 100644 --- a/ImFileDialog.cpp +++ b/ImFileDialog.cpp @@ -1406,10 +1406,9 @@ namespace ifd { m_finalize(); } - int escapeKey = ImGui::GetIO().KeyMap[ImGuiKey_Escape]; - if (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && - escapeKey >= 0 && ImGui::IsKeyPressed(escapeKey)) - m_isOpen = false; + if (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && + ImGuiKey_Escape >= 0 && ImGui::IsKeyPressed(ImGuiKey_Escape)) + m_isOpen = false; } } From c89aa80edba9bd87629850383fd1a13b0ebb4574 Mon Sep 17 00:00:00 2001 From: Arnaud Loonstra Date: Sun, 7 Apr 2024 21:34:24 +0200 Subject: [PATCH 2/2] define NOMINMAX --- ImFileDialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ImFileDialog.cpp b/ImFileDialog.cpp index 601aa50..81e04b1 100644 --- a/ImFileDialog.cpp +++ b/ImFileDialog.cpp @@ -14,6 +14,7 @@ #include "stb_image.h" #ifdef _WIN32 +#define NOMINMAX #include #include #include