Hello Guest

Detecting display driver version in windows

  • 0 Replies

Offline Endolf

  • ***
  • 101
    • http://www.computerbooth.com/
Detecting display driver version in windows
« on: March 10, 2010, 22:25:37 »

I've done some digging around and think I've come up with a method for detecting the driver version number under windows xp and 7.

I noticed that on my windows 7 64 bit installation I had 5 entries in the HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\VIDEO area that Display.getAdapter() currently uses. The first 2 were to do with RDP, the 3rd was the default VGA driver and the last 2(?) were my nvidia card. On my winxp build farm box I have no graphics drivers installed, so it showed up as the default vga driver, a netmeeting driver and an RDP driver.

video0 seems to have been the location of any non default driver in XP. In windows 7 it seems to append to the list instead of prepending.

What I've done is to modify it the getAdapter code so that it reads the max device key, reads the list of all entries in the driver map, ignores RDP and netmeeting drivers, holds on to the VGA driver incase and then returns either, the next driver it finds, or the vga one if no others are found.

This means that on boxes with no addon cards, the default vga driver should be returned, on winxp the first driver should be returned, which should be the current behaviour, and on win 7 it will find the first non default card, or the vga one failing that.

The Display.getVersion() method also had to be changed as nvidia list 3 of 6 DLLs in 1 line on the installed drivers key, so I now string split the driver also.

Can someone sanity check this information and if it makes sense, find the attached patch :)