Skip to main content

SDL_GetPlatform

Function SDL_GetPlatform 

Source
pub unsafe extern "C" fn SDL_GetPlatform() -> *const c_char
Expand description

Get the name of the platform.

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.