sdlGetCurrentDisplayMode function
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.
\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_GetDesktopDisplayMode \sa SDL_GetDisplays
extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayID displayID)
Implementation
Pointer<SdlDisplayMode> sdlGetCurrentDisplayMode(int displayId) {
final sdlGetCurrentDisplayModeLookupFunction = libSdl3.lookupFunction<
Pointer<SdlDisplayMode> Function(Uint32 displayId),
Pointer<SdlDisplayMode> Function(
int displayId)>('SDL_GetCurrentDisplayMode');
return sdlGetCurrentDisplayModeLookupFunction(displayId);
}