Scroll to navigation

SDL_GetPlatform(3) SDL3 FUNCTIONS SDL_GetPlatform(3)

NAME

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

SDL 3.5.0 Simple Directmedia Layer