SDL_GetPlatform(3)

SDL_GetPlatform3

Get the name of the platform.

Usage

#include "SDL3/SDL.h"

const char * SDL_GetPlatform(void);

Header file

Defined in SDL3/SDL_platform.h

Overview

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".

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.