SDL_GetPlatform - Man Page

Get the name of the platform.

Header File

Defined in SDL3/SDL_platform.h

Synopsis

#include "SDL3/SDL.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".

Availability

This function is available since SDL 3.2.0.

Info

SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS