From e3be7d8303af33cdbf34fc73c5c30099c791f803 Mon Sep 17 00:00:00 2001 From: Dionisio E Alonso Date: Wed, 8 Apr 2015 19:35:45 -0300 Subject: [PATCH] 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. --- SystemInformation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SystemInformation.py b/SystemInformation.py index 0deebfa..9ff23c3 100644 --- a/SystemInformation.py +++ b/SystemInformation.py @@ -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)