[WINMM/MMIO] Default to FOURCC_DOS if no IOProc found.

Christian Costa titan.costa at wanadoo.fr
Mon Mar 15 16:06:47 CST 2004


Hi,

When an app has not installed any IOProc handler, finding the right 
FOURCC from the file extension does not help.
In this case, we should default to FOURCC.

Changelog :
Default to FOURCC_DOS if no IOProc found.

Christian Costa   titan.costa at wanadoo.fr
-------------- next part --------------
Index: mmio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mmio.c,v
retrieving revision 1.44
diff -u -r1.44 mmio.c
--- mmio.c	5 Mar 2004 20:43:40 -0000	1.44
+++ mmio.c	15 Mar 2004 20:55:43 -0000
@@ -633,7 +633,12 @@
 	/* Handle any unhandled/error case. Assume DOS file */
 	if (wm->info.fccIOProc == 0)
 	    wm->info.fccIOProc = FOURCC_DOS;
-	if (!(wm->ioProc = MMIO_FindProcNode(wm->info.fccIOProc))) goto error2;
+	if (!(wm->ioProc = MMIO_FindProcNode(wm->info.fccIOProc))) {
+	    /* If not found, retry with FOURCC_DOS */
+	    wm->info.fccIOProc = FOURCC_DOS;
+	    if (!(wm->ioProc = MMIO_FindProcNode(wm->info.fccIOProc)))
+		goto error2;
+	}
 	wm->bTmpIOProc = FALSE;
     }
     /* if just the four character code is present, look up IO proc */


More information about the wine-patches mailing list