Commit c4629e5a authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winmm: Memory file buffer is available even if we just allocate memory.

parent 09a1f81c
......@@ -574,7 +574,7 @@ static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
wm->info.pchEndRead = wm->info.pchBuffer;
wm->info.pchEndWrite = wm->info.pchBuffer + cchBuffer;
wm->info.lBufOffset = wm->info.lDiskOffset;
wm->bBufferLoaded = FALSE;
wm->bBufferLoaded = (wm->info.fccIOProc == FOURCC_MEM);
return MMSYSERR_NOERROR;
}
......@@ -660,9 +660,6 @@ static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
goto error1;
}
if (wm->info.fccIOProc == FOURCC_MEM && !(wm->info.dwFlags & MMIO_ALLOCBUF))
wm->bBufferLoaded = TRUE;
/* see mmioDosIOProc for that one */
memcpy( wm->info.adwInfo, refmminfo->adwInfo, sizeof(wm->info.adwInfo) );
......
......@@ -347,10 +347,7 @@ static void test_mmioOpen(char *fname)
ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset);
ret = mmioSeek(hmmio, 0, SEEK_CUR);
if (fname)
ok(ret == 0, "expected 0, got %d\n", ret);
else
todo_wine ok(ret == 0, "expected 0, got %d\n", ret);
ok(ret == 0, "expected 0, got %d\n", ret);
mmioClose(hmmio, 0);
......@@ -408,10 +405,7 @@ static void test_mmioOpen(char *fname)
ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset);
ret = mmioSeek(hmmio, 0, SEEK_CUR);
if (fname)
ok(ret == 0, "expected 0, got %d\n", ret);
else
todo_wine ok(ret == 0, "expected 0, got %d\n", ret);
ok(ret == 0, "expected 0, got %d\n", ret);
mmioClose(hmmio, 0);
......@@ -440,10 +434,7 @@ static void test_mmioOpen(char *fname)
ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset);
ret = mmioSeek(hmmio, 0, SEEK_CUR);
if (fname)
ok(ret == 0, "expected 0, got %d\n", ret);
else
todo_wine ok(ret == 0, "expected 0, got %d\n", ret);
ok(ret == 0, "expected 0, got %d\n", ret);
mmioClose(hmmio, 0);
......@@ -607,10 +598,7 @@ static void test_mmioSetBuffer(char *fname)
ok(mmio.lDiskOffset == 0, "expected 0, got %d\n", mmio.lDiskOffset);
ret = mmioSeek(hmmio, 0, SEEK_CUR);
if (fname)
ok(ret == 0, "expected 0, got %d\n", ret);
else
todo_wine ok(ret == 0, "expected 0, got %d\n", ret);
ok(ret == 0, "expected 0, got %d\n", ret);
mmioClose(hmmio, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment