Module: wine Branch: master Commit: 79264b27c173c7e44c13af5e32fc18e1c84bd862 URL: https://gitlab.winehq.org/wine/wine/-/commit/79264b27c173c7e44c13af5e32fc18e...
Author: Eric Pouech epouech@codeweavers.com Date: Tue Oct 17 19:58:17 2023 +0200
dsound: Forward error code when device cannot be found.
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/dsound/dsound.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 0b8edaaaf06..b35f9c7cbdd 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -288,9 +288,10 @@ static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGU IsEqualGUID(lpcGUID, &DSDEVID_DefaultVoiceCapture)) return DSERR_NODRIVER;
- if (GetDeviceID(lpcGUID, &devGUID) != DS_OK) { + hr = GetDeviceID(lpcGUID, &devGUID); + if (FAILED(hr)) { WARN("invalid parameter: lpcGUID\n"); - return DSERR_INVALIDPARAM; + return hr; }
hr = get_mmdevice(eRender, &devGUID, &mmdevice);