Print the bounds of each display when showing mode information
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Sep 2012 14:21:15 -0700
changeset 6505 ce7abf273d8c
parent 6504 100c49578dba
child 6506 305f0fcc0e99
Print the bounds of each display when showing mode information
test/common.c
--- a/test/common.c	Fri Sep 28 14:01:55 2012 -0700
+++ b/test/common.c	Fri Sep 28 14:21:15 2012 -0700
@@ -617,6 +617,7 @@
         }
 
         if (state->verbose & VERBOSE_MODES) {
+            SDL_Rect bounds;
             SDL_DisplayMode mode;
             int bpp;
             Uint32 Rmask, Gmask, Bmask, Amask;
@@ -626,6 +627,10 @@
             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);