|
Size: 1261
Comment: create page, add content
|
Size: 1502
Comment: update content - 2/28 5421 (2/10 5244)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 11: | Line 11: |
| SDL_DisplayMode* SDL_GetClosestDisplayMode(const SDL_DisplayMode* mode, | SDL_DisplayMode* SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode* mode, |
| Line 16: | Line 17: |
| ||'''mode'''||the desired display mode|| ||'''closest'''||a pointer to a display mode to be filled in with the closest match of the available display modes|| |
||'''displayIndex'''||the index of the display to query|| ||'''mode'''||an [[SDL_DisplayMode]] structure containing the desired display mode|| ||'''closest'''||an [[SDL_DisplayMode]] structure filled in with the closest match of the available display modes|| |
| Line 20: | Line 22: |
| The passed in value '''closest''', or NULL if no matching video mode was available. | Returns the passed in value '''closest''', or NULL if no matching video mode was available. |
| Line 28: | Line 30: |
| 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 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. | 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. |
| Line 33: | Line 35: |
---- [[CategoryAPI]], [[CategoryVideo]] |
SDL_GetClosestDisplayMode
Use this function to get the closest match to the requested display mode.
Contents
Syntax
SDL_DisplayMode* SDL_GetClosestDisplayMode(int displayIndex,
const SDL_DisplayMode* mode,
SDL_DisplayMode* closest)
Function Parameters
displayIndex |
the index of the display to query |
mode |
an SDL_DisplayMode structure containing the desired display mode |
closest |
an SDL_DisplayMode structure 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.
