LWJGL
May 22, 2012, 14:24:46 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Detecting display driver version in windows  (Read 637 times)
Endolf
Regular nerd
**
Posts: 97



WWW
« on: March 10, 2010, 14:25:37 »

Hi

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 Smiley

Cheers

Endolf
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!