Skip to main content

SDL_GetCurrentDisplayMode

Function SDL_GetCurrentDisplayMode 

Source
pub unsafe extern "C" fn SDL_GetCurrentDisplayMode(
    displayID: SDL_DisplayID,
) -> *const SDL_DisplayMode
Expand description

Get information about the current display mode.

There’s a difference between this function and SDL_GetDesktopDisplayMode() when SDL runs fullscreen and has changed the resolution. In that case this function will return the current display mode, and not the previous native display mode.

Parameter: displayID the instance ID of the display to query. Returns: a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.

Thread Safety: This function should only be called on the main thread.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_GetDesktopDisplayMode See Also: SDL_GetDisplays