From 1610c80a397c351da10005107fe7f80a6ada66c3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 24 Mar 2021 18:37:41 +0100 Subject: [PATCH] winealsa: Use nameless unions. Signed-off-by: Jacek Caban Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/winealsa.drv/Makefile.in | 1 - dlls/winealsa.drv/mmdevdrv.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dlls/winealsa.drv/Makefile.in b/dlls/winealsa.drv/Makefile.in index d14a0628076..3158371a64f 100644 --- a/dlls/winealsa.drv/Makefile.in +++ b/dlls/winealsa.drv/Makefile.in @@ -2,7 +2,6 @@ MODULE = winealsa.drv IMPORTS = uuid ole32 advapi32 DELAYIMPORTS = winmm EXTRALIBS = $(ALSA_LIBS) -EXTRADEFS = -DWINE_NO_NAMELESS_EXTENSION C_SRCS = \ midi.c \ diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index cf2edcc7454..5f7d277ce9a 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -4324,15 +4324,15 @@ HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARI serial_number = (guid->Data4[4] << 24) | (guid->Data4[5] << 16) | (guid->Data4[6] << 8) | guid->Data4[7]; out->vt = VT_LPWSTR; - out->u.pwszVal = CoTaskMemAlloc(128 * sizeof(WCHAR)); + out->pwszVal = CoTaskMemAlloc(128 * sizeof(WCHAR)); - if(!out->u.pwszVal) + if(!out->pwszVal) return E_OUTOFMEMORY; if(connection == AudioDeviceConnectionType_USB) - sprintfW( out->u.pwszVal, usbformatW, vendor_id, product_id, device, serial_number); + sprintfW( out->pwszVal, usbformatW, vendor_id, product_id, device, serial_number); else if(connection == AudioDeviceConnectionType_PCI) - sprintfW( out->u.pwszVal, pciformatW, vendor_id, product_id, device, serial_number); + sprintfW( out->pwszVal, pciformatW, vendor_id, product_id, device, serial_number); return S_OK; } @@ -4356,15 +4356,15 @@ HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARI out->vt = VT_UI4; if (num_speakers > 6) - out->u.ulVal = KSAUDIO_SPEAKER_STEREO; + out->ulVal = KSAUDIO_SPEAKER_STEREO; else if (num_speakers == 6) - out->u.ulVal = KSAUDIO_SPEAKER_5POINT1; + out->ulVal = KSAUDIO_SPEAKER_5POINT1; else if (num_speakers >= 4) - out->u.ulVal = KSAUDIO_SPEAKER_QUAD; + out->ulVal = KSAUDIO_SPEAKER_QUAD; else if (num_speakers >= 2) - out->u.ulVal = KSAUDIO_SPEAKER_STEREO; + out->ulVal = KSAUDIO_SPEAKER_STEREO; else if (num_speakers == 1) - out->u.ulVal = KSAUDIO_SPEAKER_MONO; + out->ulVal = KSAUDIO_SPEAKER_MONO; return S_OK; }