Dmitry Timoshkov : winmm: MMIO_ALLOCBUF is ignored if mmioOpen gets a valid buffer.

Alexandre Julliard julliard at winehq.org
Tue Oct 21 07:07:05 CDT 2008


Module: wine
Branch: master
Commit: d40e003303d4ae2a2239ddfd5ef8b0be61959ac4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d40e003303d4ae2a2239ddfd5ef8b0be61959ac4

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Tue Oct 21 19:27:16 2008 +0900

winmm: MMIO_ALLOCBUF is ignored if mmioOpen gets a valid buffer.

Existing tests show that MMIO_ALLOCBUF flag is dropped if a valid buffer
is being passed to mmioOpen, that means the buffer is valid in that case.

---

 dlls/winmm/mmio.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c
index 60b6d0f..a750bf2 100644
--- a/dlls/winmm/mmio.c
+++ b/dlls/winmm/mmio.c
@@ -667,10 +667,11 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
         refmminfo->wErrorRet = MMIO_SetBuffer(wm, refmminfo->pchBuffer, refmminfo->cchBuffer, 0);
 	if (refmminfo->wErrorRet != MMSYSERR_NOERROR)
 	    goto error1;
-	if (wm->info.fccIOProc == FOURCC_MEM)
-	    wm->bBufferLoaded = TRUE;
     }
 
+    if (wm->info.fccIOProc == FOURCC_MEM && !(wm->info.dwFlags & MMIO_ALLOCBUF))
+        wm->bBufferLoaded = TRUE;
+
     /* see mmioDosIOProc for that one */
     wm->info.adwInfo[0] = refmminfo->adwInfo[0];
 




More information about the wine-cvs mailing list