SDL_GetPlatform - Man Page
Get the name of the platform.
Synopsis
#include <SDL3/SDL_platform.h> const char * SDL_GetPlatform(void);
Description
Here are the names returned for some (but not all) supported platforms:
· "Windows"
· "macOS"
· "Linux"
· "iOS"
· "Android"
Return Value
Returns the name of the platform. If the correct platform name is not available, returns a string beginning with the text "Unknown".
Thread Safety
It is safe to call this function from any thread.
Availability
This function is available since SDL 3.2.0.
Info
SDL 3.4.8 Simple Directmedia Layer SDL3 FUNCTIONS