Print the bounds of each display when showing mode information
authorSam Lantinga
Fri, 28 Sep 2012 14:21:15 -0700
changeset 6505ce7abf273d8c
parent 6504 100c49578dba
child 6506 305f0fcc0e99
Print the bounds of each display when showing mode information
test/common.c
     1.1 --- a/test/common.c	Fri Sep 28 14:01:55 2012 -0700
     1.2 +++ b/test/common.c	Fri Sep 28 14:21:15 2012 -0700
     1.3 @@ -617,6 +617,7 @@
     1.4          }
     1.5  
     1.6          if (state->verbose & VERBOSE_MODES) {
     1.7 +            SDL_Rect bounds;
     1.8              SDL_DisplayMode mode;
     1.9              int bpp;
    1.10              Uint32 Rmask, Gmask, Bmask, Amask;
    1.11 @@ -626,6 +627,10 @@
    1.12              for (i = 0; i < n; ++i) {
    1.13                  fprintf(stderr, "Display %d:\n", i);
    1.14  
    1.15 +                SDL_zero(bounds);
    1.16 +                SDL_GetDisplayBounds(i, &bounds);
    1.17 +                fprintf(stderr, "Bounds: %dx%d at %d,%d\n", bounds.w, bounds.h, bounds.x, bounds.y);
    1.18 +
    1.19                  SDL_GetDesktopDisplayMode(i, &mode);
    1.20                  SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask,
    1.21                                             &Bmask, &Amask);