SDL 3.0
SDL_platform.h File Reference
Include dependency graph for SDL_platform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char * SDL_GetPlatform (void)

Function Documentation

◆ SDL_GetPlatform()

const char * SDL_GetPlatform ( void )
extern

CategoryPlatform

SDL provides a means to identify the app's platform, both at compile time and runtime. Get the name of the platform.

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

\threadsafety It is safe to call this function from any thread.

Since
This function is available since SDL 3.2.0.