[PATCH 1/2] dsound: Fix mixup between HWAVEOUT and HWAVEIN.

Michael Stefaniuc mstefani at redhat.de
Tue Jan 27 18:06:57 CST 2009


The code path is taken when a valid wod isn't found. The loop thus
doesn't call waveInMessage() for each wid but retries the same wrong
wod.
---

Search and replace is good, especially when the code begs to differ and
doesn't want to match the search pattern ;)


 dlls/dsound/propset.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dsound/propset.c b/dlls/dsound/propset.c
index 43caa63..00a3120 100644
--- a/dlls/dsound/propset.c
+++ b/dlls/dsound/propset.c
@@ -543,14 +543,14 @@ static HRESULT DSPROPERTY_Description1(
                     ppd->DataFlow = DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE;
                     ppd->WaveDeviceId = wid;
                     ppd->Devnode = wid;
-                    err = mmErr(waveInMessage((HWAVEIN)wod,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
+                    err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD_PTR)&(desc),0));
                     if (err == DS_OK) {
                         PIDSDRIVER drv = NULL;
                         lstrcpynA(ppd->DescriptionA, desc.szDesc, sizeof(ppd->DescriptionA));
                         lstrcpynA(ppd->ModuleA, desc.szDrvname, sizeof(ppd->ModuleA));
                         MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, ppd->DescriptionW, sizeof(ppd->DescriptionW)/sizeof(WCHAR) );
                         MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1, ppd->ModuleW, sizeof(ppd->ModuleW)/sizeof(WCHAR) );
-                        err = mmErr(waveInMessage((HWAVEIN)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
+                        err = mmErr(waveInMessage((HWAVEIN)wid, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&drv, 0));
                         if (err == DS_OK && drv)
                             ppd->Type = DIRECTSOUNDDEVICE_TYPE_VXD;
                         else
-- 
1.6.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090128/c5827241/attachment.pgp 


More information about the wine-patches mailing list