winmm: Avoid direct seeking for memory files.
This commit is contained in:
parent
c4629e5af5
commit
f7ddc1eb95
|
@ -871,7 +871,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
|
|||
return MMSYSERR_INVALHANDLE;
|
||||
|
||||
/* not buffered, direct seek on file */
|
||||
if (!wm->info.pchBuffer)
|
||||
if (!wm->info.pchBuffer && wm->info.fccIOProc != FOURCC_MEM)
|
||||
return send_message(wm->ioProc, &wm->info, MMIOM_SEEK, lOffset, iOrigin, FALSE);
|
||||
|
||||
switch (iOrigin) {
|
||||
|
|
|
@ -315,10 +315,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);
|
||||
|
||||
|
@ -531,10 +528,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);
|
||||
|
||||
ret = mmioSetBuffer(hmmio, NULL, 0, MMIO_ALLOCBUF);
|
||||
ok(ret == MMSYSERR_NOERROR, "mmioSetBuffer error %u\n", ret);
|
||||
|
@ -554,10 +548,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);
|
||||
|
||||
ret = mmioSetBuffer(hmmio, buf, 0, MMIO_ALLOCBUF);
|
||||
ok(ret == MMSYSERR_NOERROR, "mmioSetBuffer error %u\n", ret);
|
||||
|
|
Loading…
Reference in New Issue