Function Display.getClosestDisplayMode

Wraps SDL_GetClosestDisplayMode which gets the closest display mode of the display to the desired mode

DisplayMode getClosestDisplayMode (
  DisplayMode desiredMode
) @trusted const;

Parameters

NameDescription
desiredMode the desired dsdl2.DisplayMode

Returns

the closest available dsdl2.DisplayMode of the display

Throws

dsdl2.SDLException if failed to get the closest display mode