winmm WAVE_MAPPER patch

Robert Reif reif at earthlink.net
Thu May 6 20:38:56 CDT 2004


Fixes a bug where waveOutGetDevCapsA succeeds with the
WAVE_MAPPER device when there are no devices.

I'm not sure this is best fix because the code is hard to
follow but it does work.

-------------- next part --------------
Index: dlls/winmm/lolvldrv.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/lolvldrv.c,v
retrieving revision 1.56
diff -u -r1.56 lolvldrv.c
--- dlls/winmm/lolvldrv.c	5 May 2004 01:00:54 -0000	1.56
+++ dlls/winmm/lolvldrv.c	7 May 2004 01:29:17 -0000
@@ -408,8 +408,11 @@
 {
     if (uDevID < llTypes[type].wMaxId)
 	return &llTypes[type].lpMlds[uDevID];
-    if ((uDevID == (UINT16)-1 || uDevID == (UINT)-1) && llTypes[type].nMapper != -1)
+
+    if ((uDevID == (UINT16)-1 || uDevID == (UINT)-1) && 
+        llTypes[type].nMapper != -1 && llTypes[type].wMaxId)
 	return &llTypes[type].lpMlds[-1];
+
     return NULL;
 }
 


More information about the wine-patches mailing list