Fix WIN32 define timing in IGFD
When the compiler hits IGFD, WIN32 is only set if standard extensions are enabled. (Why?) IGFD identifies Windows via WIN32 instead of _WIN32. (Why?) - WIN32 is needed for #ifdef-gated Windows-specific methods in the header & code files. - There's fallback code in the code file to set WIN32 if _WIN32 or __WIN32__ is set. - Which is hit *after* the header gets included, so the header doesn't expose required methods. -> Boom, error! Workaround by moving the fallback into the header.
This commit is contained in:
parent
58fc35227e
commit
3d00e1d784
|
@ -44,10 +44,7 @@ SOFTWARE.
|
|||
#if defined (__EMSCRIPTEN__) // EMSCRIPTEN
|
||||
#include <emscripten.h>
|
||||
#endif // EMSCRIPTEN
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif // WIN32
|
||||
#ifdef WIN32
|
||||
#define stat _stat
|
||||
#define stricmp _stricmp
|
||||
#include <cctype>
|
||||
|
|
|
@ -581,6 +581,12 @@ ImGuiFontStudio is using also ImGuiFileDialog.
|
|||
#ifndef IMGUIFILEDIALOG_H
|
||||
#define IMGUIFILEDIALOG_H
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif // WIN32
|
||||
#endif // defined(__WIN32__) || defined(_WIN32)
|
||||
|
||||
#define IMGUIFILEDIALOG_VERSION "v0.6.4"
|
||||
|
||||
#ifndef CUSTOM_IMGUIFILEDIALOG_CONFIG
|
||||
|
|
Loading…
Reference in New Issue