1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-24 07:40:22 +01:00

Demo: amend/fix for MinGW

Amend 4d6fbaf.
This commit is contained in:
ocornut 2023-08-07 18:25:56 +02:00
parent 4d6fbaff11
commit edebb90a9a

View File

@ -94,14 +94,8 @@ Index of this file:
#include <stdio.h> // vsnprintf, sscanf, printf #include <stdio.h> // vsnprintf, sscanf, printf
#include <stdlib.h> // NULL, malloc, free, atoi #include <stdlib.h> // NULL, malloc, free, atoi
#include <stdint.h> // intptr_t #include <stdint.h> // intptr_t
// Format specifiers for 64-bit values (hasn't been decently standardized since VS2013)
#if !defined(_MSC_VER) || _MSC_VER >= 1800 #if !defined(_MSC_VER) || _MSC_VER >= 1800
#include <inttypes.h> #include <inttypes.h> // PRId64/PRIu64, not avail in some MinGW headers.
#elif !defined(PRId64)
#define PRId64 "I64d"
#define PRIu64 "I64u"
#define PRIX64 "I64X"
#endif #endif
// Visual Studio warnings // Visual Studio warnings
@ -151,6 +145,15 @@ Index of this file:
#define vsnprintf _vsnprintf #define vsnprintf _vsnprintf
#endif #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 // Helpers macros
// We normally try to not use many helpers in imgui_demo.cpp in order to make code easier to copy and paste, // 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... // but making an exception here as those are largely simplifying code...