mirror of https://github.com/encounter/SDL.git
Fixed building with Visual Studio 2017 and the Windows XP toolset if _USING_V110_SDK71_ accidentally gets undefined
This commit is contained in:
parent
148ac5b3cf
commit
12d33b33ca
|
@ -120,21 +120,29 @@
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||||
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
#if defined(_MSC_VER) && _MSC_VER >= 1910 /* _MSC_VER == 1910 for Visual Studio 2017 */
|
||||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
#define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>)
|
||||||
|
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
|
||||||
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
|
||||||
|
#define HAVE_WINAPIFAMILY_H 1
|
||||||
|
#else
|
||||||
|
#define HAVE_WINAPIFAMILY_H 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_WINAPIFAMILY_H
|
||||||
#include <winapifamily.h>
|
#include <winapifamily.h>
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
|
||||||
#undef __WINDOWS__
|
#else
|
||||||
#define __WINDOWS__ 1
|
#define WINAPI_FAMILY_WINRT 0
|
||||||
/* See if we're compiling for WinRT: */
|
#endif /* HAVE_WINAPIFAMILY_H */
|
||||||
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
|
||||||
|
#if WINAPI_FAMILY_WINRT
|
||||||
#undef __WINRT__
|
#undef __WINRT__
|
||||||
#define __WINRT__ 1
|
#define __WINRT__ 1
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#undef __WINDOWS__
|
#undef __WINDOWS__
|
||||||
#define __WINDOWS__ 1
|
#define __WINDOWS__ 1
|
||||||
#endif /* _MSC_VER < 1700 */
|
#endif
|
||||||
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
|
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
|
||||||
|
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WINDOWS__)
|
||||||
|
|
Loading…
Reference in New Issue