Skip to content

Commit 8afb963

Browse files
committed
fix for ImGui API change in v1.92.x (dynfonts, cf ocornut/imgui#8465)
1 parent dbbc812 commit 8afb963

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ImFileDialog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
#include <pwd.h>
2525
#endif
2626

27+
#ifdef IMGUI_HAS_TEXTURES
28+
#define ICON_SIZE ImGui::GetFontSize() * ImGui::GetIO().FontGlobalScale + 3
29+
#else
2730
#define ICON_SIZE ImGui::GetFont()->FontSize * ImGui::GetIO().FontGlobalScale + 3
31+
#endif
32+
2833
#define GUI_ELEMENT_SIZE std::max(GImGui->FontSize + 10.f, 24.f)
2934
#define DEFAULT_ICON_SIZE 32
3035
#define PI 3.141592f

0 commit comments

Comments
 (0)