Mercurial > sdl-ios-xcode
diff test/common.c @ 5249:762e40fb8e28
Be explicit about what display you're querying. The default display is 0.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 10 Feb 2011 12:14:37 -0800 |
parents | af8ca17f6b7c |
children | 58265e606e4e |
line wrap: on
line diff
--- a/test/common.c Thu Feb 10 11:39:08 2011 -0800 +++ b/test/common.c Thu Feb 10 12:14:37 2011 -0800 @@ -594,9 +594,8 @@ fprintf(stderr, "Number of displays: %d\n", n); for (i = 0; i < n; ++i) { fprintf(stderr, "Display %d:\n", i); - SDL_SelectVideoDisplay(i); - SDL_GetDesktopDisplayMode(&mode); + SDL_GetDesktopDisplayMode(i, &mode); SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask, &Bmask, &Amask); fprintf(stderr, @@ -612,13 +611,13 @@ } /* Print available fullscreen video modes */ - m = SDL_GetNumDisplayModes(); + m = SDL_GetNumDisplayModes(i); if (m == 0) { fprintf(stderr, "No available fullscreen video modes\n"); } else { fprintf(stderr, " Fullscreen video modes:\n"); for (j = 0; j < m; ++j) { - SDL_GetDisplayMode(j, &mode); + SDL_GetDisplayMode(i, j, &mode); SDL_PixelFormatEnumToMasks(mode.format, &bpp, &Rmask, &Gmask, &Bmask, &Amask); fprintf(stderr, @@ -642,7 +641,6 @@ } } - SDL_SelectVideoDisplay(state->display); if (state->verbose & VERBOSE_RENDER) { SDL_RendererInfo info;