Dmitry Timoshkov wrote:
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.
This patch fixes a regression reported in the bug 15694.
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];
Hi,
Is there a way the existing tests can be improved? Apparently the existing tests show the behaviour but didn't prevent the regression.
"Paul Vriens" paul.vriens.wine@gmail.com wrote:
Is there a way the existing tests can be improved? Apparently the existing tests show the behaviour but didn't prevent the regression.
Existing tests only check for the flags (and the state) of the MMIO handle after it has been created. An improvement could be added by doing real IO after that. I should add that the MMIO_ALLOCBUF case never worked correctly before my patches, and the regression occured between my changes.