Go to the documentation of this file.
28#ifndef SDL_platform_defines_h_
29#define SDL_platform_defines_h_
32#define SDL_PLATFORM_AIX 1
35#define SDL_PLATFORM_HAIKU 1
37#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
38#define SDL_PLATFORM_BSDI 1
40#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
41#define SDL_PLATFORM_FREEBSD 1
43#if defined(hpux) || defined(__hpux) || defined(__hpux__)
44#define SDL_PLATFORM_HPUX 1
46#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
47#define SDL_PLATFORM_IRIX 1
49#if (defined(linux) || defined(__linux) || defined(__linux__))
50#define SDL_PLATFORM_LINUX 1
52#if defined(ANDROID) || defined(__ANDROID__)
53#undef SDL_PLATFORM_LINUX
54#define SDL_PLATFORM_ANDROID 1
57#define SDL_PLATFORM_NGAGE 1
60#if defined(__unix__) || defined(__unix) || defined(unix)
61#define SDL_PLATFORM_UNIX 1
65#define SDL_PLATFORM_APPLE 1
67#include <AvailabilityMacros.h>
68#ifndef __has_extension
69#define __has_extension(x) 0
70#include <TargetConditionals.h>
73#include <TargetConditionals.h>
80#ifndef TARGET_OS_MACCATALYST
81#define TARGET_OS_MACCATALYST 0
84#define TARGET_OS_IOS 0
86#ifndef TARGET_OS_IPHONE
87#define TARGET_OS_IPHONE 0
92#ifndef TARGET_OS_SIMULATOR
93#define TARGET_OS_SIMULATOR 0
95#ifndef TARGET_OS_VISION
96#define TARGET_OS_VISION 0
100#define SDL_PLATFORM_TVOS 1
103#define SDL_PLATFORM_VISIONOS 1
106#define SDL_PLATFORM_IOS 1
108#define SDL_PLATFORM_MACOS 1
109#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
110# error SDL for macOS only supports deploying on 10.7 and above.
116#define SDL_PLATFORM_EMSCRIPTEN 1
119#define SDL_PLATFORM_NETBSD 1
122#define SDL_PLATFORM_OPENBSD 1
124#if defined(__OS2__) || defined(__EMX__)
125#define SDL_PLATFORM_OS2 1
127#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
128#define SDL_PLATFORM_OSF 1
131#define SDL_PLATFORM_QNXNTO 1
133#if defined(riscos) || defined(__riscos) || defined(__riscos__)
134#define SDL_PLATFORM_RISCOS 1
136#if defined(__sun) && defined(__SVR4)
137#define SDL_PLATFORM_SOLARIS 1
140#if defined(__CYGWIN__)
141#define SDL_PLATFORM_CYGWIN 1
144#if defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)
145#define SDL_PLATFORM_WINDOWS 1
148#if defined(_MSC_VER) && defined(__has_include)
149#if __has_include(<winapifamily.h>)
150#define HAVE_WINAPIFAMILY_H 1
152#define HAVE_WINAPIFAMILY_H 0
156#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_)
157#define HAVE_WINAPIFAMILY_H 1
159#define HAVE_WINAPIFAMILY_H 0
162#if HAVE_WINAPIFAMILY_H
163#include <winapifamily.h>
164#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
166#define WINAPI_FAMILY_WINRT 0
169#if HAVE_WINAPIFAMILY_H && HAVE_WINAPIFAMILY_H
170#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
172#define SDL_WINAPI_FAMILY_PHONE 0
175#if WINAPI_FAMILY_WINRT
176#define SDL_PLATFORM_WINRT 1
177#elif defined(_GAMING_DESKTOP)
178#define SDL_PLATFORM_WINGDK 1
179#elif defined(_GAMING_XBOX_XBOXONE)
180#define SDL_PLATFORM_XBOXONE 1
181#elif defined(_GAMING_XBOX_SCARLETT)
182#define SDL_PLATFORM_XBOXSERIES 1
184#define SDL_PLATFORM_WIN32 1
189#if defined(SDL_PLATFORM_WINGDK) || defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
190#define SDL_PLATFORM_GDK 1
192#if defined(__PSP__) || defined(__psp__)
193#define SDL_PLATFORM_PSP 1
195#if defined(__PS2__) || defined(PS2)
196#define SDL_PLATFORM_PS2 1
199#if defined(__vita__) || defined(__psp2__)
200#define SDL_PLATFORM_VITA 1
205#define SDL_PLATFORM_3DS 1