Mercurial > sdl-ios-xcode
diff test/testvidinfo.c @ 3528:59ff7a2beb57
Added an API function to query geometry of multiple monitors:
SDL_GetDisplayBounds()
Implemented multi-monitor window positions on Windows
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Dec 2009 08:03:38 +0000 |
parents | 929e7dd10031 |
children | 762e40fb8e28 |
line wrap: on
line diff
--- a/test/testvidinfo.c Sun Dec 06 06:21:39 2009 +0000 +++ b/test/testvidinfo.c Sun Dec 06 08:03:38 2009 +0000 @@ -449,7 +449,12 @@ } printf("Number of displays: %d\n", SDL_GetNumVideoDisplays()); for (d = 0; d < SDL_GetNumVideoDisplays(); ++d) { - printf("Display %d:\n", d); + SDL_Rect bounds; + + SDL_GetDisplayBounds(d, &bounds); + printf("Display %d: %dx%d at %d,%d\n", d, + bounds.w, bounds.h, bounds.x, bounds.y); + SDL_SelectVideoDisplay(d); SDL_GetDesktopDisplayMode(&mode);