Re: [GD-Windows] set display mode - refresh rate problem
Brought to you by:
vexxed72
From: Ken P. <ke...@dr...> - 2002-08-20 00:14:56
|
G'day! There's no mention of it in the ChangeDisplaySettings but if you look up the DEVMODE structure it has this: dmDisplayFrequency Specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known as the display device's vertical refresh rate. Display drivers use this member. It is used, for example, in the ChangeDisplaySettings function. Printer drivers do not use this member. When you call the EnumDisplaySettings function, the dmDisplayFrequency member may return with the value 0 or 1. These values represent the display hardware's default refresh rate. This default rate is typically set by switches on a display card or computer motherboard, or by a configuration program that does not use display functions such as ChangeDisplaySettings. While that implies that 0 or 1 are valid, it doesn't guarantee it's safe unless the enumeration returns a 0 or 1. I suppose you could try the mode and show it for 10-15 seconds, then ask the user if it was visible. You'd only have to do it once with a config utility (tho offer the option to re-run the config if they change hardware) and save your safe values. It's not an uncommon thing in Display Settings config utilities. Stay Casual, Ken At 07:54 AM 8/19/2002, Ivan-Assen Ivanov wrote: >Hello, > >It turned out we do the wrong way something as simple as resolution switching, >enumerating the display modes at the desired resolution, >then switching to the last of them - which, if you have a good >videocard on a crappy non-configured monitor, results in >out of synch black screen. > >I found something with Google about supplying >ChangeDisplaySettings with "0" or "1" instead of hertz value >for the refresh rate, which supposedly sets some kind of "default", >but I can't find any official documentation on it. > >How do you handle display mode switching? > >regards, >Assen > > > >------------------------------------------------------- >This sf.net email is sponsored by: OSDN - Tired of that same old >cell phone? Get a new here for FREE! >https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 >_______________________________________________ >Gamedevlists-windows mailing list >Gam...@li... >https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_id=555 |