SDL_GetDisplayMode

Use this function to get information about a specific display mode.

Syntax

int SDL_GetDisplayMode(int              displayIndex,
                       int              modeIndex,
                       SDL_DisplayMode* mode)

Function Parameters

displayIndex

the index of the display to query

modeIndex

the index of the display mode to query

mode

an SDL_DisplayMode structure filled in with the mode at modeIndex

Return Value

Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

The display modes are sorted in this priority:

  • bits per pixel -> more colors to fewer colors

  • width -> largest to smallest

  • height -> largest to smallest

  • refresh rate -> highest to lowest


CategoryAPI, CategoryVideo

SDL_GetDisplayMode (last edited 2011-03-07 19:35:28 by SheenaSmith)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit