You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Windows] Rename PKEY_Device_FriendlyName to avoid duplicate symbols with newer MinGW SDKs.
(cherry picked from commit c363e13051)
This commit is contained in:
committed by
Rémi Verschelde
parent
61adafae2f
commit
58c5aeb99b
@@ -89,7 +89,7 @@ __CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7
|
|||||||
|
|
||||||
#endif // __MINGW32__ || __MINGW64__
|
#endif // __MINGW32__ || __MINGW64__
|
||||||
|
|
||||||
#ifndef PKEY_Device_FriendlyName
|
#ifndef PKEY_Device_FriendlyNameGodot
|
||||||
|
|
||||||
#undef DEFINE_PROPERTYKEY
|
#undef DEFINE_PROPERTYKEY
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
@@ -97,7 +97,7 @@ __CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7
|
|||||||
const PROPERTYKEY id = { { a, b, c, { d, e, f, g, h, i, j, k, } }, l };
|
const PROPERTYKEY id = { { a, b, c, { d, e, f, g, h, i, j, k, } }, l };
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
|
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyNameGodot, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
|
const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
|
||||||
@@ -237,7 +237,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i
|
|||||||
PROPVARIANT propvar;
|
PROPVARIANT propvar;
|
||||||
PropVariantInit(&propvar);
|
PropVariantInit(&propvar);
|
||||||
|
|
||||||
hr = props->GetValue(PKEY_Device_FriendlyName, &propvar);
|
hr = props->GetValue(PKEY_Device_FriendlyNameGodot, &propvar);
|
||||||
ERR_BREAK(hr != S_OK);
|
ERR_BREAK(hr != S_OK);
|
||||||
|
|
||||||
if (p_device->device_name == String(propvar.pwszVal)) {
|
if (p_device->device_name == String(propvar.pwszVal)) {
|
||||||
@@ -609,7 +609,7 @@ PackedStringArray AudioDriverWASAPI::audio_device_get_list(bool p_input) {
|
|||||||
PROPVARIANT propvar;
|
PROPVARIANT propvar;
|
||||||
PropVariantInit(&propvar);
|
PropVariantInit(&propvar);
|
||||||
|
|
||||||
hr = props->GetValue(PKEY_Device_FriendlyName, &propvar);
|
hr = props->GetValue(PKEY_Device_FriendlyNameGodot, &propvar);
|
||||||
ERR_BREAK(hr != S_OK);
|
ERR_BREAK(hr != S_OK);
|
||||||
|
|
||||||
list.push_back(String(propvar.pwszVal));
|
list.push_back(String(propvar.pwszVal));
|
||||||
|
|||||||
Reference in New Issue
Block a user