From 633433e0bf133706d6531550eb5f370dd31526ba Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Sep 2012 14:21:15 -0700 Subject: [PATCH] Print the bounds of each display when showing mode information --- test/common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/common.c b/test/common.c index fb6411c36..fbe256432 100644 --- a/test/common.c +++ b/test/common.c @@ -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; @@ -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);