1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-01 03:30:06 +00:00

imgui_internal.h: default to PRId64/PRIu64/PRIX64 from inttypes.h

This commit is contained in:
Demonese 2025-06-27 11:59:06 +08:00
parent 81838faefa
commit 8d86d22b06

View file

@ -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 <inttypes.h> (non-windows) and on Windows define them yourself.
#ifndef IMGUI_DISABLE_STDINT_EXACT_BIT_WIDTH_INTEGER
#include <inttypes.h>
#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