|
Size: 1424
Comment: minor change
|
Size: 1398
Comment: update content - pointers, structs
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 16: | Line 16: |
| ||'''mode'''||a pointer to an [[SDL_DisplayMode]] structure containing the desired display mode|| ||'''closest'''||a pointer to an [[SDL_DisplayMode]] structure to be filled in with the closest match of the available display modes|| |
||'''mode'''||an [[SDL_DisplayMode]] structure containing the desired display mode|| ||'''closest'''||an [[SDL_DisplayMode]] structure to be filled in with the closest match of the available display modes|| |
SDL_GetClosestDisplayMode
Use this function to get the closest match to the requested display mode.
Contents
Syntax
SDL_DisplayMode* SDL_GetClosestDisplayMode(const SDL_DisplayMode* mode,
SDL_DisplayMode* closest)
Function Parameters
mode |
an SDL_DisplayMode structure containing the desired display mode |
closest |
an SDL_DisplayMode structure to be filled in with the closest match of the available display modes |
Return Value
Returns the passed in value closest, or NULL if no matching video mode was available.
Code Examples
You can add your code example here
Remarks
The available display modes are scanned and closest is filled in with the closest mode matching the requested mode and returned. The mode format and refresh rate default to the desktop mode if they are set to 0. The modes are scanned with size being first priority, format being second priority, and finally checking the refresh rate. If all the available modes are too small, then NULL is returned.
