summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-12 20:17:49 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-12 20:19:17 +0300
commitad4cc8682bb72c38ed47adf7fdfe2ba092221dd9 (patch)
tree273be9120f4648567a2575b9e361c4d2729f23f7 /platform
parentea47e03b360d0aeee10c1f7ef798f5750c2b1aa8 (diff)
[Windows] Fix GCC MinGW warnings.
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/os_windows.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 5e4ba4a9e3..5ca064e523 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -331,8 +331,10 @@ Vector<String> OS_Windows::get_video_adapter_driver_info() const {
if (hr != S_OK) {
return Vector<String>();
}
+ BSTR resource_name = SysAllocString(L"root\\CIMV2");
+ hr = wbemLocator->ConnectServer(resource_name, NULL, NULL, NULL, 0, NULL, NULL, &wbemServices);
+ SysFreeString(resource_name);
- hr = wbemLocator->ConnectServer(L"root\\CIMV2", NULL, NULL, 0, NULL, 0, 0, &wbemServices);
SAFE_RELEASE(wbemLocator) // from now on, use `wbemServices`
if (hr != S_OK) {
SAFE_RELEASE(wbemServices)