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
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
IWbemLocator* Wmi::pLoc = nullptr;
|
||||
IWbemServices* Wmi::pSvc = nullptr;
|
||||
HRESULT WmiInit = Wmi::init();
|
||||
|
||||
// Taken from https://stackoverflow.com/questions/215963/
|
||||
// Convert a wide Unicode string to an UTF8 string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue