Added an API function to query geometry of multiple monitors:

SDL_GetDisplayBounds()

Implemented multi-monitor window positions on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404271
This commit is contained in:
Sam Lantinga 2009-12-06 08:03:38 +00:00
parent 540357e23a
commit 52f2433c29
13 changed files with 124 additions and 34 deletions

View file

@ -449,7 +449,12 @@ main(int argc, char *argv[])
}
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);