SDL_DisplayMode Struct Reference

The structure that defines a display mode. More...

`#include <SDL_video.h>`

## Data Fields

Uint32 | format
int | w
int | h
int | refresh_rate
void * | driverdata

## Detailed Description

The structure that defines a display mode.

See also
  SDL_GetNumDisplayModes()
  SDL_GetDisplayMode()
  SDL_GetDesktopDisplayMode()
  SDL_GetCurrentDisplayMode()
  SDL_GetClosestDisplayMode()
  SDL_SetWindowDisplayMode()
  SDL_GetWindowDisplayMode()

Definition at line 53 of file SDL_video.h.

## Field Documentation

void* SDL_DisplayMode::driverdata

driver-specific data, initialize to 0

Definition at line 59 of file SDL_video.h.

Referenced by SDL_GetClosestDisplayModeForDisplay(), SDL_VideoQuit(), video_getClosestDisplayModeCurrentResolution(), and video_getClosestDisplayModeRandomResolution().

Uint32 SDL_DisplayMode::format

pixel format

Definition at line 55 of file SDL_video.h.

Referenced by cmpmodes(), print_mode(), SDL_GetClosestDisplayModeForDisplay(), SDL_GetWindowPixelFormat(), SDL_SetDisplayModeForDisplay(), SDLTest_CommonInit(), video_getClosestDisplayModeCurrentResolution(), and video_getClosestDisplayModeRandomResolution().

int SDL_DisplayMode::h

height, in screen coordinates

Definition at line 57 of file SDL_video.h.

Referenced by cmpmodes(), print_mode(), SDL_GetClosestDisplayModeForDisplay(), SDL_GetDisplayBounds(), SDL_GetWindowDisplayMode(), SDL_SetDisplayModeForDisplay(), SDL_UpdateFullscreenMode(), SDLTest_CommonInit(), video_getClosestDisplayModeCurrentResolution(), video_getClosestDisplayModeRandomResolution(), and video_getWindowDisplayMode().

int SDL_DisplayMode::refresh_rate

refresh rate (or zero for unspecified)

Definition at line 58 of file SDL_video.h.

Referenced by cmpmodes(), print_mode(), SDL_GetClosestDisplayModeForDisplay(), SDL_SetDisplayModeForDisplay(), SDLTest_CommonInit(), video_getClosestDisplayModeCurrentResolution(), video_getClosestDisplayModeRandomResolution(), and video_getWindowDisplayMode().

int SDL_DisplayMode::w

width, in screen coordinates

Definition at line 56 of file SDL_video.h.

Referenced by cmpmodes(), print_mode(), SDL_GetClosestDisplayModeForDisplay(), SDL_GetDisplayBounds(), SDL_GetWindowDisplayMode(), SDL_SetDisplayModeForDisplay(), SDL_UpdateFullscreenMode(), SDLTest_CommonInit(), video_getClosestDisplayModeCurrentResolution(), video_getClosestDisplayModeRandomResolution(), and video_getWindowDisplayMode().

The documentation for this struct was generated from the following file:

- include/SDL_video.h