Refresh Rate Support
When called to set the video mode in Enable, ReEnable, etc., display drivers written for Windows® 95 should set the refresh rate based on the current monitor selected in the Display control panel. The sample XGA driver source code in the Device Driver Kit (DDK) demonstrates how to do this.
When refresh rate support is enabled for a driver, the virtual display device (VDD) provides the following information about the current monitor in the DISPLAYINFO structure (defined in MINIVDD.INC) returned by VDD_GetDisplayInfo:
- Pre-calculated maximum vertical refresh rate: If there is a VESA DDC EDID monitor identifier for the current monitor in the registry, the VDD returns the highest standard refresh rate supported for the current resolution. Otherwise, it calculates an estimated maximum refresh rate for the current resolution using the frequency ranges in the software registry key for the current monitor.
- Horizontal and vertical frequency ranges: When the user selects the monitor type in the Display control panel, these ranges are written to the software registry key by the monitor INF file. If a monitor supports multiple timing ranges, the VDD returns the optimal range for the current resolution.
- VESA DDC EDID structure: If Windows 95 is configured to detect VESA DDC monitors, and a DDC monitor is detected, its 128-byte EDID structure is stored in the monitor's hardware registry key. The DISPLAYINFO structure returned by the VDD contains a handle for the current monitor that can be passed to the registry API to return the EDID structure. For more information, see the section Reading the EDID for the Current Monitor.
The most simple display driver would set the refresh rate based on the pre-computed refresh rate value returned for #1. Depending on the video BIOS services available to it, a more sophisticated driver might use the horizontal and vertical ranges specified by #2. An even more optimized driver can read the EDID data directly from the registry, using the handle returned in the DISPLAYINFO structure, and optimize display timings based on it.