DOKK / manpages / debian 13 / libsdl3-doc / SDL_GetPlatform.3.en
SDL_GetPlatform(3) SDL3 FUNCTIONS SDL_GetPlatform(3)

SDL_GetPlatform - Get the name of the platform.

Defined in SDL3/SDL_platform.h

#include "SDL3/SDL.h"
const char * SDL_GetPlatform(void);

Here are the names returned for some (but not all) supported platforms:

• "Windows"

• "macOS"

• "Linux"

• "iOS"

• "Android"

Returns the name of the platform. If the correct platform name is not available, returns a string beginning with the text "Unknown".

This function is available since SDL 3.2.0.

SDL 3.2.10 Simple Directmedia Layer