Wiki Page Content

Differences between revisions 7 and 8
Revision 7 as of 2011-04-05 18:02:43
Size: 886
Editor: SheenaSmith
Comment: minor change for consistency
Revision 8 as of 2014-06-22 07:46:28
Size: 987
Editor: dthree
Comment: Is my format string redundant?
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
You can add your code example here SDL_Rect r;
if (SDL_GetDisplayBounds(0, &r) != 0) {
    SDL_Log("SDL_GetDisplayBounds failed: %s", SDL_GetError());
    return 1;
}

SDL_GetDisplayBounds

Use this function to get the desktop area represented by a display, with the primary display located at 0,0.

Syntax

int SDL_GetDisplayBounds(int       displayIndex,
                         SDL_Rect* rect)

Function Parameters

displayIndex

the index of the display to query

rect

the SDL_Rect structure filled in with the display bounds

Return Value

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

Code Examples

SDL_Rect r;
if (SDL_GetDisplayBounds(0, &r) != 0) {
    SDL_Log("SDL_GetDisplayBounds failed: %s", SDL_GetError());
    return 1;
}

Remarks

You can add useful comments here


CategoryAPI, CategoryVideo

None: SDL_GetDisplayBounds (last edited 2014-06-22 07:46:28 by dthree)

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