winmm: Update lBufOffset after seeking file directly.
This commit is contained in:
parent
f7ddc1eb95
commit
71b8a56c84
|
@ -871,8 +871,12 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
|
|||
return MMSYSERR_INVALHANDLE;
|
||||
|
||||
/* not buffered, direct seek on file */
|
||||
if (!wm->info.pchBuffer && wm->info.fccIOProc != FOURCC_MEM)
|
||||
return send_message(wm->ioProc, &wm->info, MMIOM_SEEK, lOffset, iOrigin, FALSE);
|
||||
if (!wm->info.pchBuffer && wm->info.fccIOProc != FOURCC_MEM) {
|
||||
LRESULT ret = send_message(wm->ioProc, &wm->info, MMIOM_SEEK, lOffset, iOrigin, FALSE);
|
||||
if (ret != -1)
|
||||
wm->info.lBufOffset = wm->info.lDiskOffset;
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (iOrigin) {
|
||||
case SEEK_SET:
|
||||
|
|
|
@ -725,7 +725,7 @@ static void test_mmioSeek(void)
|
|||
ok(mmio.pchNext == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchNext);
|
||||
ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead);
|
||||
ok(mmio.pchEndWrite == mmio.pchBuffer + mmio.cchBuffer, "expected %p + %d, got %p\n", mmio.pchBuffer, mmio.cchBuffer, mmio.pchEndWrite);
|
||||
todo_wine ok(mmio.lBufOffset == size, "expected %d, got %d\n", size, mmio.lBufOffset);
|
||||
ok(mmio.lBufOffset == size, "expected %d, got %d\n", size, mmio.lBufOffset);
|
||||
ok(mmio.lDiskOffset == size, "expected %d, got %d\n", size, mmio.lDiskOffset);
|
||||
|
||||
/* seek backward from the end */
|
||||
|
|
Loading…
Reference in New Issue