sdlGetDesktopDisplayMode function
Get information about the desktop's display mode.
There's a difference between this function and SDL_GetCurrentDisplayMode() when SDL runs fullscreen and has changed the resolution. In that case this function will return the previous native display mode, and not the current display mode.
\param 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.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_GetCurrentDisplayMode \sa SDL_GetDisplays
extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayID displayID)
Implementation
Pointer<SdlDisplayMode> sdlGetDesktopDisplayMode(int displayId) {
final sdlGetDesktopDisplayModeLookupFunction = libSdl3.lookupFunction<
Pointer<SdlDisplayMode> Function(Uint32 displayId),
Pointer<SdlDisplayMode> Function(
int displayId)>('SDL_GetDesktopDisplayMode');
return sdlGetDesktopDisplayModeLookupFunction(displayId);
}