[GD-Windows] More multimon
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2003-03-30 22:23:12
|
Multi-monitor support is a bit of a mess. Disregarding NT4 and Win95, which simply compound problems across= the board because of lack of native multi-monitor support, it's still= a mess. I don't even really have questions, I'm just posting this to see= if anyone has an opinion. Using a GF4 Ti4200 w/ dual-head as my reference on Win2K, I have= found out the following. In a default installation, the NVidia driver reports to the= system that it's actually a single device with a single monitor. This= means GetSystemMetrics( SM_CMONITORS ) returns 1; and= EnumDisplayMonitors() also only finds a single monitor. EnumDisplayDevices() will only= show a single display device, and within that device you will= only find a single monitor represented. For all intents and purposes, the default dual-head install with= the NVidia drivers looks exactly like a widescreen single head system= (2560x1024 in my case). Thus any window that is centered will= end up getting chopped in half (although there are options in the= control panel to force dialogs, etc. to go to one monitor or another). In addition, going "full screen" will shut off one monitor. Not= to mention that trying to infer the right "native" resolution is= going to be tough. For example, if you want to run 1024x768 but= centered in a 1280x1024 LCD fullscreen session (to avoid interpolation artifacts) there's simply no way to really to do that. The best= you can do is run in a window and hope the user doesn't mind; or= force to 1024x768 and hope it's not too ugly; or try to infer with some complicated heuristics what the best video resolution might be,= but even then you're never quite sure which monitor it's going to= select (e.g. I have a 17" LCD and a 21" CRT, the former supports up to 1280x1024 and the latter goes up to 1600x1200). Now, all that ugliness aside, if you solve it there you're still= in for trouble if the drivers have the "Treat each display as a= separate device" check box enabled in the control panel. When THAT is enabled you can see that there are multiple monitors= (thankfully). Both GetSystemMetrics and EnumDisplayMonitors= report the right information. Unfortunately there are now duplicated entries in the global= device list. The display adapter will show up twice, with identical properties, one time as primary and another time as secondary. = And each of these instances will think it has FOUR monitors attached,= two for standard and two for Plug'n'Play. I haven't figured out a clean way to discard a secondary if I= know that it's just an alias for the primary (there aren't any= duplicated fields). Limiting to primary only then turns around and hoses= those people with an AGP + PCI configuration and who want stuff to run= on the secondary. If I limit to primary only, then a lot of things get simplified,= but I'm not sure if that's really a good thing, since on some systems= the BIOS defaults to making PCI the primary device, which obviously= is not what you'd want in most cases. I haven't even sat down and tried to sort out what happens on a Matrox G550 or Parhelia, or an AGP + PCI configuration. I also haven't investigated DirectX's capabilities either, since= it varies depending on the version (and just browsing the docs, it= seems like it assumes a 1:1 correlation between adapter and monitors,= so I'm guessing multihead cards have to present "virtual" adapters= to the system). Bah. When I get this all sorted I'll work out a flow chart. It won't= be pretty. Brian |