diff options
Diffstat (limited to 'src/SDL2/include/SDL_platform.h')
-rw-r--r-- | src/SDL2/include/SDL_platform.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/SDL2/include/SDL_platform.h b/src/SDL2/include/SDL_platform.h index afe33891..dbe71a70 100644 --- a/src/SDL2/include/SDL_platform.h +++ b/src/SDL2/include/SDL_platform.h @@ -113,10 +113,26 @@ #undef __SOLARIS__ #define __SOLARIS__ 1 #endif + #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) +/* 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 >= 1700) && !(_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */ +#include <winapifamily.h> +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) #undef __WINDOWS__ #define __WINDOWS__ 1 +/* See if we're compiling for WinRT: */ +#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) +#undef __WINRT__ +#define __WINRT__ 1 #endif +#else +#undef __WINDOWS__ +#define __WINDOWS__ 1 +#endif /* _MSC_VER < 1700 */ +#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */ + #if defined(__WINDOWS__) #undef __WIN32__ #define __WIN32__ 1 |