[PATCH] winepulse.drv: Support older version of the AudioClientProperties structure
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu Nov 19 04:48:53 CST 2020
Warframe when using a win10 prefix, uses an xaudio2_9redist.dll which
uses the older AudioClientProperties structure (missing the Options member).
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/winepulse.drv/mmdevdrv.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index cef8a2d4d5b..319904ee55a 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -2254,13 +2254,17 @@ static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient3 *iface,
if(!prop)
return E_POINTER;
- if(prop->cbSize != sizeof(*prop))
+ /* Windows 8 and below doesn't have the Options Field. */
+ if(prop->cbSize != sizeof(*prop) && prop->cbSize != FIELD_OFFSET(AudioClientProperties, Options))
+ {
+ WARN("Unsupported Size = %d\n", prop->cbSize);
return E_INVALIDARG;
-
+ }
+
TRACE("{ bIsOffload: %u, eCategory: 0x%x, Options: 0x%x }\n",
prop->bIsOffload,
prop->eCategory,
- prop->Options);
+ prop->cbSize == sizeof(*prop) ? prop->Options : 0);
if(prop->bIsOffload)
return AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE;
--
2.29.2
More information about the wine-devel
mailing list