Alexander Puzankov : winmm: Use the default I/ O procedure only if a custom procedure for a given FOURCC is not found.
Alexandre Julliard
julliard at winehq.org
Wed Dec 1 12:56:46 CST 2010
Module: wine
Branch: master
Commit: 304c455b2ba8953a421498e5d05730085297ef4c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=304c455b2ba8953a421498e5d05730085297ef4c
Author: Alexander Puzankov <alxpnv at gmail.com>
Date: Mon Nov 29 21:47:26 2010 +0300
winmm: Use the default I/O procedure only if a custom procedure for a given FOURCC is not found.
---
dlls/winmm/mmio.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c
index 0ebebf1..b090b3f 100644
--- a/dlls/winmm/mmio.c
+++ b/dlls/winmm/mmio.c
@@ -617,13 +617,13 @@ static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
if (refmminfo->fccIOProc == 0 && refmminfo->pIOProc == NULL) {
wm->info.fccIOProc = MMIO_ParseExtA(szFileName);
/* Handle any unhandled/error case. Assume DOS file */
- if (wm->info.fccIOProc == 0)
+ if (wm->info.fccIOProc == 0) {
wm->info.fccIOProc = FOURCC_DOS;
- 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->ioProc = &defaultProcs[0];
+ }
+ else if (!(wm->ioProc = MMIO_FindProcNode(wm->info.fccIOProc))) {
+ /* If not found, assume DOS file */
+ wm->ioProc = &defaultProcs[0];
}
wm->bTmpIOProc = FALSE;
}
@@ -1315,7 +1315,7 @@ MMRESULT WINAPI mmioRenameA(LPCSTR szFileName, LPCSTR szNewFileName,
/* Handle any unhandled/error case from above. Assume DOS file */
if (!lpmmioinfo || (lpmmioinfo->fccIOProc == 0 && lpmmioinfo->pIOProc == NULL && ioProc == NULL))
- ioProc = MMIO_FindProcNode(FOURCC_DOS);
+ ioProc = &defaultProcs[0];
/* if just the four character code is present, look up IO proc */
else if (lpmmioinfo->pIOProc == NULL)
ioProc = MMIO_FindProcNode(lpmmioinfo->fccIOProc);
More information about the wine-cvs
mailing list