Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Print the bounds of each display when showing mode information
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 28, 2012
1 parent 5ea5ff4 commit 633433e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/common.c
Expand Up @@ -617,6 +617,7 @@ CommonInit(CommonState * state)
}

if (state->verbose & VERBOSE_MODES) {
SDL_Rect bounds;
SDL_DisplayMode mode;
int bpp;
Uint32 Rmask, Gmask, Bmask, Amask;
Expand All @@ -626,6 +627,10 @@ CommonInit(CommonState * state)
for (i = 0; i < n; ++i) {
fprintf(stderr, "Display %d:\n", i);

SDL_zero(bounds);
SDL_GetDisplayBounds(i, &bounds);
fprintf(stderr, "Bounds: %dx%d at %d,%d\n", bounds.w, bounds.h, bounds.x, bounds.y);

SDL_GetDesktopDisplayMode(i, &mode);
SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask,
&Bmask, &Amask);
Expand Down

0 comments on commit 633433e

Please sign in to comment.