Roll back in video devices detection

The different numbers 0000, 0001 following the device hash key are video
outputs. The device is the same and should not be duplicated.
This commit is contained in:
Dionisio E Alonso 2015-04-08 19:35:45 -03:00
parent 911495fdfa
commit e3be7d8303
1 changed files with 3 additions and 3 deletions

View File

@ -49,12 +49,12 @@ class SystemInformation:
'HKEY_LOCAL_MACHINE',
'HARDWARE\\DEVICEMAP\\VIDEO',
'\Device\Video{}'.format(device))
reg_key = '\\'.join(video_card_string.split('\\')[-2:])
reg_key = video_card_string.split('\\')[-2]
# Probe keys to avoid software devices
get_registry_value(
'HKEY_LOCAL_MACHINE',
'SYSTEM\\CurrentControlSet\\Control\\Video\\'
'{}'.format(reg_key),
'{}\\0000'.format(reg_key),
'HardwareInformation.AdapterString')
reg_keys.append(reg_key)
except:
@ -65,7 +65,7 @@ class SystemInformation:
device_descrption = get_registry_value(
'HKEY_LOCAL_MACHINE',
'SYSTEM\\CurrentControlSet\\Control\\Video\\'
'{}'.format(video_card),
'{}\\0000'.format(video_card),
'Device Description')
video_cards.append(device_descrption)
return '\n\t'.join(video_cards)