Initialize WMI only once, remove init calls from everywhere it is called and initialize it once as a static variable
* See comment: https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/1581#note_684260496
This commit is contained in:
parent
eaaed7fd83
commit
dd47256f06
6 changed files with 2 additions and 5 deletions
|
|
@ -498,7 +498,6 @@ void i2c_smbus_i801_detect()
|
|||
i2c_smbus_interface * bus;
|
||||
HRESULT hres;
|
||||
Wmi wmi;
|
||||
wmi.init();
|
||||
|
||||
// Query WMI for Win32_PnPSignedDriver entries with names matching "SMBUS" or "SM BUS"
|
||||
// These devices may be browsed under Device Manager -> System Devices
|
||||
|
|
|
|||
|
|
@ -192,7 +192,6 @@ void i2c_smbus_piix4_detect()
|
|||
i2c_smbus_interface * bus;
|
||||
HRESULT hres;
|
||||
Wmi wmi;
|
||||
wmi.init();
|
||||
|
||||
// Query WMI for Win32_PnPSignedDriver entries with names matching "SMBUS" or "SM BUS"
|
||||
// These devices may be browsed under Device Manager -> System Devices
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue