mirror of https://gitlab.com/baco/winsysinfo.git
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:
parent
911495fdfa
commit
e3be7d8303
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue