|
SDL3pp
A slim C++ wrapper for SDL3
|
SDL provides a means to identify the app's platform, both at compile time and runtime. More...

Macros | |
| #define | SDL_PLATFORM_AIX 1 |
| A preprocessor macro that is only defined if compiling for AIX. More... | |
| #define | SDL_PLATFORM_BSDI 1 |
| A preprocessor macro that is only defined if compiling for BSDi. More... | |
| #define | SDL_PLATFORM_FREEBSD 1 |
| A preprocessor macro that is only defined if compiling for FreeBSD. More... | |
| #define | SDL_PLATFORM_HPUX 1 |
| A preprocessor macro that is only defined if compiling for HP-UX. More... | |
| #define | SDL_PLATFORM_IRIX 1 |
| A preprocessor macro that is only defined if compiling for IRIX. More... | |
| #define | SDL_PLATFORM_LINUX 1 |
| A preprocessor macro that is only defined if compiling for Linux. More... | |
| #define | SDL_PLATFORM_ANDROID 1 |
| A preprocessor macro that is only defined if compiling for Android. More... | |
| #define | SDL_PLATFORM_UNIX 1 |
| A preprocessor macro that is only defined if compiling for a Unix-like system. More... | |
| #define | SDL_PLATFORM_APPLE 1 |
| A preprocessor macro that is only defined if compiling for Apple platforms. More... | |
| #define | SDL_PLATFORM_TVOS 1 |
| A preprocessor macro that is only defined if compiling for tvOS. More... | |
| #define | SDL_PLATFORM_VISIONOS 1 |
| A preprocessor macro that is only defined if compiling for VisionOS. More... | |
| #define | SDL_PLATFORM_IOS 1 |
| A preprocessor macro that is only defined if compiling for iOS. More... | |
| #define | SDL_PLATFORM_MACOS 1 |
| A preprocessor macro that is only defined if compiling for macOS. More... | |
| #define | SDL_PLATFORM_EMSCRIPTEN 1 |
| A preprocessor macro that is only defined if compiling for Emscripten. More... | |
| #define | SDL_PLATFORM_NETBSD 1 |
| A preprocessor macro that is only defined if compiling for NetBSD. More... | |
| #define | SDL_PLATFORM_OPENBSD 1 |
| A preprocessor macro that is only defined if compiling for OpenBSD. More... | |
| #define | SDL_PLATFORM_OS2 1 |
| A preprocessor macro that is only defined if compiling for OS/2. More... | |
| #define | SDL_PLATFORM_OSF 1 |
| A preprocessor macro that is only defined if compiling for Tru64 (OSF/1). More... | |
| #define | SDL_PLATFORM_QNXNTO 1 |
| A preprocessor macro that is only defined if compiling for QNX Neutrino. More... | |
| #define | SDL_PLATFORM_RISCOS 1 |
| A preprocessor macro that is only defined if compiling for RISC OS. More... | |
| #define | SDL_PLATFORM_SOLARIS 1 |
| A preprocessor macro that is only defined if compiling for SunOS/Solaris. More... | |
| #define | SDL_PLATFORM_CYGWIN 1 |
| A preprocessor macro that is only defined if compiling for Cygwin. More... | |
| #define | SDL_PLATFORM_WINDOWS 1 |
| A preprocessor macro that is only defined if compiling for Windows. More... | |
| #define | SDL_WINAPI_FAMILY_PHONE 1 |
| A preprocessor macro that defined to 1 if compiling for Windows Phone. More... | |
| #define | SDL_PLATFORM_WINGDK 1 |
| A preprocessor macro that is only defined if compiling for Microsoft GDK for Windows. More... | |
| #define | SDL_PLATFORM_XBOXSERIES 1 |
| A preprocessor macro that is only defined if compiling for Xbox Series. More... | |
| #define | SDL_PLATFORM_WIN32 1 |
| A preprocessor macro that is only defined if compiling for desktop Windows. More... | |
| #define | SDL_PLATFORM_GDK 1 |
| A preprocessor macro that is only defined if compiling for Microsoft GDK on any platform. More... | |
| #define | SDL_PLATFORM_PSP 1 |
| A preprocessor macro that is only defined if compiling for Sony PSP. More... | |
| #define | SDL_PLATFORM_PS2 1 |
| A preprocessor macro that is only defined if compiling for Sony PlayStation 2. More... | |
| #define | SDL_PLATFORM_VITA 1 |
| A preprocessor macro that is only defined if compiling for Sony Vita. More... | |
| #define | SDL_PLATFORM_3DS 1 |
| A preprocessor macro that is only defined if compiling for Nintendo 3DS. More... | |
Functions | |
| const char * | SDL::GetPlatform () |
| Get the name of the platform. More... | |
For sanity, we don't wrap the macros, so use the regular SDL_* macros as documented.
| #define SDL_PLATFORM_3DS 1 |
| #define SDL_PLATFORM_AIX 1 |
| #define SDL_PLATFORM_ANDROID 1 |
| #define SDL_PLATFORM_APPLE 1 |
iOS, macOS, etc will additionally define a more specific platform macro.
| #define SDL_PLATFORM_BSDI 1 |
| #define SDL_PLATFORM_CYGWIN 1 |
| #define SDL_PLATFORM_EMSCRIPTEN 1 |
| #define SDL_PLATFORM_FREEBSD 1 |
| #define SDL_PLATFORM_GDK 1 |
| #define SDL_PLATFORM_HPUX 1 |
| #define SDL_PLATFORM_IOS 1 |
| #define SDL_PLATFORM_IRIX 1 |
| #define SDL_PLATFORM_LINUX 1 |
Note that Android, although ostensibly a Linux-based system, will not define this. It defines SDL_PLATFORM_ANDROID instead.
| #define SDL_PLATFORM_MACOS 1 |
| #define SDL_PLATFORM_NETBSD 1 |
| #define SDL_PLATFORM_OPENBSD 1 |
| #define SDL_PLATFORM_OS2 1 |
| #define SDL_PLATFORM_OSF 1 |
| #define SDL_PLATFORM_PS2 1 |
| #define SDL_PLATFORM_PSP 1 |
| #define SDL_PLATFORM_QNXNTO 1 |
| #define SDL_PLATFORM_RISCOS 1 |
| #define SDL_PLATFORM_SOLARIS 1 |
| #define SDL_PLATFORM_TVOS 1 |
| #define SDL_PLATFORM_UNIX 1 |
Other platforms, like Linux, might define this in addition to their primary define.
| #define SDL_PLATFORM_VISIONOS 1 |
| #define SDL_PLATFORM_VITA 1 |
| #define SDL_PLATFORM_WIN32 1 |
Despite the "32", this also covers 64-bit Windows; as an informal convention, its system layer tends to still be referred to as "the Win32 API."
| #define SDL_PLATFORM_WINDOWS 1 |
This also covers several other platforms, like Microsoft GDK, Xbox, WinRT, etc. Each will have their own more-specific platform macros, too.
| #define SDL_PLATFORM_WINGDK 1 |
| #define SDL_PLATFORM_XBOXSERIES 1 |
| #define SDL_WINAPI_FAMILY_PHONE 1 |
|
inline |
Here are the names returned for some (but not all) supported platforms: