|
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. | |
| #define | SDL_PLATFORM_BSDI 1 |
| A preprocessor macro that is only defined if compiling for BSDi. | |
| #define | SDL_PLATFORM_FREEBSD 1 |
| A preprocessor macro that is only defined if compiling for FreeBSD. | |
| #define | SDL_PLATFORM_HPUX 1 |
| A preprocessor macro that is only defined if compiling for HP-UX. | |
| #define | SDL_PLATFORM_IRIX 1 |
| A preprocessor macro that is only defined if compiling for IRIX. | |
| #define | SDL_PLATFORM_LINUX 1 |
| A preprocessor macro that is only defined if compiling for Linux. | |
| #define | SDL_PLATFORM_ANDROID 1 |
| A preprocessor macro that is only defined if compiling for Android. | |
| #define | SDL_PLATFORM_UNIX 1 |
| A preprocessor macro that is only defined if compiling for a Unix-like system. | |
| #define | SDL_PLATFORM_APPLE 1 |
| A preprocessor macro that is only defined if compiling for Apple platforms. | |
| #define | SDL_PLATFORM_TVOS 1 |
| A preprocessor macro that is only defined if compiling for tvOS. | |
| #define | SDL_PLATFORM_VISIONOS 1 |
| A preprocessor macro that is only defined if compiling for VisionOS. | |
| #define | SDL_PLATFORM_IOS 1 |
| A preprocessor macro that is only defined if compiling for iOS. | |
| #define | SDL_PLATFORM_MACOS 1 |
| A preprocessor macro that is only defined if compiling for macOS. | |
| #define | SDL_PLATFORM_EMSCRIPTEN 1 |
| A preprocessor macro that is only defined if compiling for Emscripten. | |
| #define | SDL_PLATFORM_NETBSD 1 |
| A preprocessor macro that is only defined if compiling for NetBSD. | |
| #define | SDL_PLATFORM_OPENBSD 1 |
| A preprocessor macro that is only defined if compiling for OpenBSD. | |
| #define | SDL_PLATFORM_OS2 1 |
| A preprocessor macro that is only defined if compiling for OS/2. | |
| #define | SDL_PLATFORM_OSF 1 |
| A preprocessor macro that is only defined if compiling for Tru64 (OSF/1). | |
| #define | SDL_PLATFORM_QNXNTO 1 |
| A preprocessor macro that is only defined if compiling for QNX Neutrino. | |
| #define | SDL_PLATFORM_RISCOS 1 |
| A preprocessor macro that is only defined if compiling for RISC OS. | |
| #define | SDL_PLATFORM_SOLARIS 1 |
| A preprocessor macro that is only defined if compiling for SunOS/Solaris. | |
| #define | SDL_PLATFORM_CYGWIN 1 |
| A preprocessor macro that is only defined if compiling for Cygwin. | |
| #define | SDL_PLATFORM_WINDOWS 1 |
| A preprocessor macro that is only defined if compiling for Windows. | |
| #define | SDL_WINAPI_FAMILY_PHONE 1 |
| A preprocessor macro that defined to 1 if compiling for Windows Phone. | |
| #define | SDL_PLATFORM_WINGDK 1 |
| A preprocessor macro that is only defined if compiling for Microsoft GDK for Windows. | |
| #define | SDL_PLATFORM_XBOXSERIES 1 |
| A preprocessor macro that is only defined if compiling for Xbox Series. | |
| #define | SDL_PLATFORM_WIN32 1 |
| A preprocessor macro that is only defined if compiling for desktop Windows. | |
| #define | SDL_PLATFORM_GDK 1 |
| A preprocessor macro that is only defined if compiling for Microsoft GDK on any platform. | |
| #define | SDL_PLATFORM_PSP 1 |
| A preprocessor macro that is only defined if compiling for Sony PSP. | |
| #define | SDL_PLATFORM_PS2 1 |
| A preprocessor macro that is only defined if compiling for Sony PlayStation 2. | |
| #define | SDL_PLATFORM_VITA 1 |
| A preprocessor macro that is only defined if compiling for Sony Vita. | |
| #define | SDL_PLATFORM_3DS 1 |
| A preprocessor macro that is only defined if compiling for Nintendo 3DS. | |
Functions | |
| const char * | SDL::GetPlatform () |
| Get the name of the platform. | |
SDL provides a means to identify the app's platform, both at compile time and runtime.
For sanity, we don't wrap the macros, so use the regular SDL_* macros as documented.
| #define SDL_PLATFORM_3DS 1 |
A preprocessor macro that is only defined if compiling for Nintendo 3DS.
| #define SDL_PLATFORM_AIX 1 |
A preprocessor macro that is only defined if compiling for AIX.
| #define SDL_PLATFORM_ANDROID 1 |
A preprocessor macro that is only defined if compiling for Android.
| #define SDL_PLATFORM_APPLE 1 |
A preprocessor macro that is only defined if compiling for Apple platforms.
iOS, macOS, etc will additionally define a more specific platform macro.
| #define SDL_PLATFORM_BSDI 1 |
A preprocessor macro that is only defined if compiling for BSDi.
| #define SDL_PLATFORM_CYGWIN 1 |
A preprocessor macro that is only defined if compiling for Cygwin.
| #define SDL_PLATFORM_EMSCRIPTEN 1 |
A preprocessor macro that is only defined if compiling for Emscripten.
| #define SDL_PLATFORM_FREEBSD 1 |
A preprocessor macro that is only defined if compiling for FreeBSD.
| #define SDL_PLATFORM_GDK 1 |
A preprocessor macro that is only defined if compiling for Microsoft GDK on any platform.
| #define SDL_PLATFORM_HPUX 1 |
A preprocessor macro that is only defined if compiling for HP-UX.
| #define SDL_PLATFORM_IOS 1 |
A preprocessor macro that is only defined if compiling for iOS.
| #define SDL_PLATFORM_IRIX 1 |
A preprocessor macro that is only defined if compiling for IRIX.
| #define SDL_PLATFORM_LINUX 1 |
A preprocessor macro that is only defined if compiling for Linux.
Note that Android, although ostensibly a Linux-based system, will not define this. It defines SDL_PLATFORM_ANDROID instead.
| #define SDL_PLATFORM_MACOS 1 |
A preprocessor macro that is only defined if compiling for macOS.
| #define SDL_PLATFORM_NETBSD 1 |
A preprocessor macro that is only defined if compiling for NetBSD.
| #define SDL_PLATFORM_OPENBSD 1 |
A preprocessor macro that is only defined if compiling for OpenBSD.
| #define SDL_PLATFORM_OS2 1 |
A preprocessor macro that is only defined if compiling for OS/2.
| #define SDL_PLATFORM_OSF 1 |
A preprocessor macro that is only defined if compiling for Tru64 (OSF/1).
| #define SDL_PLATFORM_PS2 1 |
A preprocessor macro that is only defined if compiling for Sony PlayStation 2.
| #define SDL_PLATFORM_PSP 1 |
A preprocessor macro that is only defined if compiling for Sony PSP.
| #define SDL_PLATFORM_QNXNTO 1 |
A preprocessor macro that is only defined if compiling for QNX Neutrino.
| #define SDL_PLATFORM_RISCOS 1 |
A preprocessor macro that is only defined if compiling for RISC OS.
| #define SDL_PLATFORM_SOLARIS 1 |
A preprocessor macro that is only defined if compiling for SunOS/Solaris.
| #define SDL_PLATFORM_TVOS 1 |
A preprocessor macro that is only defined if compiling for tvOS.
| #define SDL_PLATFORM_UNIX 1 |
A preprocessor macro that is only defined if compiling for a Unix-like system.
Other platforms, like Linux, might define this in addition to their primary define.
| #define SDL_PLATFORM_VISIONOS 1 |
A preprocessor macro that is only defined if compiling for VisionOS.
| #define SDL_PLATFORM_VITA 1 |
A preprocessor macro that is only defined if compiling for Sony Vita.
| #define SDL_PLATFORM_WIN32 1 |
A preprocessor macro that is only defined if compiling for desktop Windows.
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 |
A preprocessor macro that is only defined if compiling for Windows.
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 |
A preprocessor macro that is only defined if compiling for Microsoft GDK for Windows.
| #define SDL_PLATFORM_XBOXSERIES 1 |
A preprocessor macro that is only defined if compiling for Xbox Series.
| #define SDL_WINAPI_FAMILY_PHONE 1 |
A preprocessor macro that defined to 1 if compiling for Windows Phone.
|
inline |
Get the name of the platform.
Here are the names returned for some (but not all) supported platforms: