aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-02 00:42:50 -0700
committerChris Robinson <[email protected]>2018-11-02 00:42:50 -0700
commitaaa31d987f92f767af0d5d9633da5bab9d7862b8 (patch)
tree87632a5b3a9158e50371f76fe8bb8cc2d7ce5be1 /Alc/backends
parentd66664122a9ba1abea41fd088e8661fff40070e3 (diff)
Check the correct propvariant object
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/wasapi.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp
index a390911b..a32f41ac 100644
--- a/Alc/backends/wasapi.cpp
+++ b/Alc/backends/wasapi.cpp
@@ -117,7 +117,7 @@ std::vector<DevMap> PlaybackDevices;
std::vector<DevMap> CaptureDevices;
-std::string wstr_to_string(const WCHAR *wstr)
+std::string wstr_to_utf8(const WCHAR *wstr)
{
std::string ret;
@@ -200,7 +200,7 @@ static NameGUIDPair get_device_name_and_guid(IMMDevice *device)
name += "Unknown Device Name";
}
else if(pvname.vt == VT_LPWSTR)
- name += wstr_to_string(pvname.pwszVal);
+ name += wstr_to_utf8(pvname.pwszVal);
else
{
WARN("Unexpected PROPVARIANT type: 0x%04x\n", pvname.vt);
@@ -218,8 +218,8 @@ static NameGUIDPair get_device_name_and_guid(IMMDevice *device)
WARN("GetValue AudioEndpoint_GUID failed: 0x%08lx\n", hr);
guid = "Unknown Device GUID";
}
- else if(pvname.vt == VT_LPWSTR)
- guid = wstr_to_string(pvname.pwszVal);
+ else if(pvguid.vt == VT_LPWSTR)
+ guid = wstr_to_utf8(pvguid.pwszVal);
else
{
WARN("Unexpected PROPVARIANT type: 0x%04x\n", pvguid.vt);