From edebb90a9aed16edd4e13e5e1c17ad36e66b6fce Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 7 Aug 2023 18:25:56 +0200 Subject: [PATCH] Demo: amend/fix for MinGW Amend 4d6fbaf. --- imgui_demo.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index d6ea23e90..1cc5331b1 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -94,14 +94,8 @@ Index of this file: #include // vsnprintf, sscanf, printf #include // NULL, malloc, free, atoi #include // intptr_t - -// Format specifiers for 64-bit values (hasn't been decently standardized since VS2013) #if !defined(_MSC_VER) || _MSC_VER >= 1800 -#include -#elif !defined(PRId64) -#define PRId64 "I64d" -#define PRIu64 "I64u" -#define PRIX64 "I64X" +#include // PRId64/PRIu64, not avail in some MinGW headers. #endif // Visual Studio warnings @@ -151,6 +145,15 @@ Index of this file: #define vsnprintf _vsnprintf #endif +// Format specifiers for 64-bit values (hasn't been decently standardized before VS2013) +#if !defined(PRId64) && defined(_MSC_VER) +#define PRId64 "I64d" +#define PRIu64 "I64u" +#elif !defined(PRId64) +#define PRId64 "lld" +#define PRIu64 "llu" +#endif + // Helpers macros // We normally try to not use many helpers in imgui_demo.cpp in order to make code easier to copy and paste, // but making an exception here as those are largely simplifying code...