Wiki Page Content

Differences between revisions 10 and 11
Revision 10 as of 2011-03-07 19:35:28
Size: 1159
Editor: SheenaSmith
Comment: update content - w/ Sam
Revision 11 as of 2014-06-29 05:56:25
Size: 1209
Editor: dthree
Comment: cmpmodes in SDL_video.c shows the sort order is different.
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
    * bits per pixel -> more colors to fewer colors
Line 35: Line 34:
    * bits per pixel -> more colors to fewer colors
    * packed pixel layout -> largest to smallest

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:

  • width -> largest to smallest

  • height -> largest to smallest

  • bits per pixel -> more colors to fewer colors

  • packed pixel layout -> largest to smallest

  • refresh rate -> highest to lowest


CategoryAPI, CategoryVideo

None: SDL_GetDisplayMode (last edited 2014-06-29 22:03:03 by dthree)

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