Enumerating DriversThe call to enumerate Drivers is DirectDrawEnumerateEx(). The paramters passed are: the pointer to the callback function, the pointer to any variable you wish to pass, and lastly, the Flags. For Example:
EnumDisplayDrivers will be called once for each Driver found. The code for EnumDisplayDrivers follows In EnumDisplayDrivers, a new DisplayDriver variable is allocated. This structure is filled with the relevant information that was passed to this function. I chose to save the GUID and the Description. The name of a Driver is currently not very descriptive and in my opinion, not nearly as useful as the Description. The D3DDevice and DisplayMode lists are initialized to NULL along with the Next value. Next, the Driver is added to the end of the global DisplayDriverList.
|
|||||||||||