Fix buglet in waveOutGetDevCapsA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Changelog:

Francois Gouget <fgouget@codeweavers.com>

* dlls/winmm/winmm.c,
dlls/winmm/tests/wave.c

If given a bad device id waveOutGetDevCapsA is supposed to return MMSYSERR_BADDEVICEID
Fixes a todo_wine in the winmm test

--
Francois Gouget
fgouget@codeweavers.com

Index: dlls/winmm/winmm.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/winmm.c,v
retrieving revision 1.10
diff -u -r1.10 winmm.c
--- dlls/winmm/winmm.c	30 Nov 2002 01:51:56 -0000	1.10
+++ dlls/winmm/winmm.c	13 Dec 2002 19:18:55 -0000
@@ -2225,7 +2226,7 @@
     if (lpCaps == NULL)	return MMSYSERR_INVALPARAM;
 
     if ((wmld = MMDRV_Get((HANDLE)uDeviceID, MMDRV_WAVEOUT, TRUE)) == NULL)
-	return MMSYSERR_INVALHANDLE;
+        return MMSYSERR_BADDEVICEID;
 
     return MMDRV_Message(wmld, WODM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE);
 
Index: dlls/winmm/tests/wave.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/tests/wave.c,v
retrieving revision 1.3
diff -u -r1.3 wave.c
--- dlls/winmm/tests/wave.c	12 Dec 2002 22:23:15 -0000	1.3
+++ dlls/winmm/tests/wave.c	13 Dec 2002 19:18:56 -0000
@@ -55,11 +181,9 @@
     ndev=waveOutGetNumDevs();
     trace("found %d WaveOut devices\n",ndev);
 
-    todo_wine {
-        rc=waveOutGetDevCapsA(ndev+1,&caps,sizeof(caps));
-        ok(rc==MMSYSERR_BADDEVICEID,
-           "waveOutGetDevCa psA: MMSYSERR_BADDEVICEID expected, got %d",rc);
-    }
+    rc=waveOutGetDevCapsA(ndev+1,&caps,sizeof(caps));
+    ok(rc==MMSYSERR_BADDEVICEID,
+       "waveOutGetDevCa psA: MMSYSERR_BADDEVICEID expected, got %d",rc);
 
     format.wFormatTag=WAVE_FORMAT_PCM;
     format.nChannels=2;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux