Enable wxUSE_GRAPHICS_CONTEXT for MinGW >= 4.8
It seems that MinGW-w32 started distributing GDI+ headers since this version and MinGW-w64 might have supported them for even longer, but it's difficult to test for the MinGW distribution used in this header, as it is included before wx/msw/gccpriv.h which defines __MINGW32_TOOLCHAIN__ and __MINGW64_TOOLCHAIN__ symbols and changing this is tricky due to relative order of defining UNICODE and wxUSE_UNICODE and including MinGW headers, which can only be included once UNICODE is set properly. But while the fully correct solution is difficult, just checking for the compiler version should solve the problem in 99.99% of the cases in practice as there should be vanishingly few people using MinGW-w64 with gcc < 4.8 currently, so this simple solution is good enough. Closes #17973.
This commit is contained in:
@@ -349,7 +349,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || \
|
||||
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#else
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
|
Reference in New Issue
Block a user