include/SDL_platform.h
changeset 11329 3ed56acc90ca
parent 11287 4d2a6202caa4
child 11469 71610a71bbb2
equal deleted inserted replaced
11328:ff47cfbabe5f 11329:3ed56acc90ca
   118 #define __SOLARIS__ 1
   118 #define __SOLARIS__ 1
   119 #endif
   119 #endif
   120 
   120 
   121 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
   121 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
   122 /* Try to find out if we're compiling for WinRT or non-WinRT */
   122 /* Try to find out if we're compiling for WinRT or non-WinRT */
   123 /* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
   123 #if defined(_MSC_VER) && _MSC_VER >= 1910                               /* _MSC_VER == 1910 for Visual Studio 2017 */
   124 #if (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_)	/* _MSC_VER==1700 for MSVC 2012 */
   124 #define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>)
       
   125 /* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
       
   126 #elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_)    /* _MSC_VER == 1700 for Visual Studio 2012 */
       
   127 #define HAVE_WINAPIFAMILY_H 1
       
   128 #else
       
   129 #define HAVE_WINAPIFAMILY_H 0
       
   130 #endif
       
   131 
       
   132 #if HAVE_WINAPIFAMILY_H
   125 #include <winapifamily.h>
   133 #include <winapifamily.h>
   126 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
   134 #define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
   127 #undef __WINDOWS__
   135 #else
   128 #define __WINDOWS__   1
   136 #define WINAPI_FAMILY_WINRT 0
   129 /* See if we're compiling for WinRT: */
   137 #endif /* HAVE_WINAPIFAMILY_H */
   130 #elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
   138 
       
   139 #if WINAPI_FAMILY_WINRT
   131 #undef __WINRT__
   140 #undef __WINRT__
   132 #define __WINRT__ 1
   141 #define __WINRT__ 1
   133 #endif
       
   134 #else
   142 #else
   135 #undef __WINDOWS__
   143 #undef __WINDOWS__
   136 #define __WINDOWS__   1
   144 #define __WINDOWS__ 1
   137 #endif /* _MSC_VER < 1700 */
   145 #endif
   138 #endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
   146 #endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
   139 
   147 
   140 #if defined(__WINDOWS__)
   148 #if defined(__WINDOWS__)
   141 #undef __WIN32__
   149 #undef __WIN32__
   142 #define __WIN32__ 1
   150 #define __WIN32__ 1