include/SDL_platform.h
changeset 8352 deef25f5fce1
parent 8316 88f011703f39
child 8358 3511af7671fd
     1.1 --- a/include/SDL_platform.h	Thu Nov 22 12:37:31 2012 -0500
     1.2 +++ b/include/SDL_platform.h	Thu Nov 22 13:11:05 2012 -0500
     1.3 @@ -114,12 +114,44 @@
     1.4  #undef __SOLARIS__
     1.5  #define __SOLARIS__	1
     1.6  #endif
     1.7 +
     1.8  #if defined(WIN32) || defined(_WIN32)
     1.9 -#if ! defined(__WINRT__)
    1.10 +/* Try to find out what version of Windows we are compiling for */
    1.11 +#if defined(_MSC_VER) && (_MSC_VER >= 1700)	/* _MSC_VER==1700 for MSVC 2012 */
    1.12 +#include <winapifamily.h>
    1.13 +#endif
    1.14 +/* Default to classic, Win32 / Desktop compilation if the version of Windows
    1.15 +   cannot be determined via winapifamily.h. */
    1.16 +#if ! defined(WINAPI_FAMILY_PARTITION)
    1.17 +#undef __WIN32__
    1.18 +#define __WIN32__ 1
    1.19 +#else
    1.20 +/* Include Win32 / Desktop App APIs in SDL, if available: */
    1.21 +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
    1.22 +#undef __WIN32__
    1.23 +#define __WIN32__ 1
    1.24 +#endif
    1.25 +/* Include WinRT / Windows Store APIs in SDL, if available: */
    1.26 +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
    1.27 +#undef __WINRT__
    1.28 +#define __WINRT__ 1
    1.29 +#endif
    1.30 +#endif
    1.31 +#endif
    1.32 +
    1.33 +/*
    1.34 +#if ! defined(WINAPI_FAMILY_PARTITION) || ! WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
    1.35  #undef __WIN32__
    1.36  #define __WIN32__	1
    1.37 +#error win32_defined
    1.38  #endif
    1.39  #endif
    1.40 +#if defined(WINAPI_FAMILY_PARTITION) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
    1.41 +#undef __WINRT__
    1.42 +#define __WINRT__	1
    1.43 +#error winrt_defined
    1.44 +#endif
    1.45 +*/
    1.46  
    1.47  #if defined(__NDS__)
    1.48  #undef __NINTENDODS__