From 8d86d22b067e0314a5b6c7129bd83d84f2774142 Mon Sep 17 00:00:00 2001 From: Demonese Date: Fri, 27 Jun 2025 11:59:06 +0800 Subject: [PATCH] imgui_internal.h: default to PRId64/PRIu64/PRIX64 from inttypes.h --- imgui_internal.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imgui_internal.h b/imgui_internal.h index 40fe681f8..313b32de0 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -326,6 +326,12 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer // Format specifiers, printing 64-bit hasn't been decently standardized... // In a real application you should be using PRId64 and PRIu64 from (non-windows) and on Windows define them yourself. +#ifndef IMGUI_DISABLE_STDINT_EXACT_BIT_WIDTH_INTEGER +#include +#define IM_PRId64 PRId64 +#define IM_PRIu64 PRIu64 +#define IM_PRIX64 PRIX64 +#else #if defined(_MSC_VER) && !defined(__clang__) #define IM_PRId64 "I64d" #define IM_PRIu64 "I64u" @@ -335,6 +341,7 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer #define IM_PRIu64 "llu" #define IM_PRIX64 "llX" #endif +#endif //----------------------------------------------------------------------------- // [SECTION] Generic helpers