WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0

This commit is contained in:
David Ludwig 2013-08-13 20:09:52 -04:00
parent 88461d442a
commit ef0a40b704
13 changed files with 110 additions and 31 deletions

View file

@ -120,10 +120,27 @@
#undef __SOLARIS__
#define __SOLARIS__ 1
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
#undef __WIN32__
#define __WIN32__ 1
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
/* Try to find out what version of Windows we are compiling for */
#if defined(_MSC_VER) && (_MSC_VER >= 1700) /* _MSC_VER==1700 for MSVC 2012 */
#include <winapifamily.h>
#endif
/* Default to classic, Win32 / Desktop compilation either if:
1. the version of Windows is explicity set to a 'Desktop' (non-Metro) app
2. the version of Windows cannot be determined via winapifamily.h
If neither is true, see if we're compiling for WinRT.
*/
#if ! defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#undef __WIN32__
#define __WIN32__ 1
/* See if we're compiling for WinRT: */
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#undef __WINRT__
#define __WINRT__ 1
#endif /* ! defined(WINAPI_FAMILY_PARTITION) */
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
#if defined(__PSP__)
#undef __PSP__
#define __PSP__ 1