msvfw32: MCI Step is like Seek.

This commit is contained in:
Jörg Höhle 2010-03-16 19:14:38 +01:00 committed by Alexandre Julliard
parent 5f6962c7fc
commit ce96eb7907
1 changed files with 8 additions and 21 deletions

View File

@ -1298,30 +1298,23 @@ end_of_mci_open:
} }
case MCI_SEEK: case MCI_SEEK:
case MCI_STEP:
{ {
MCI_SEEK_PARMS mci_seek; MCI_SEEK_PARMS mci_seek; /* Layout is useable as MCI_XYZ_STEP_PARMS */
DWORD flags = MCI_STEP == wMsg ? 0 :
switch (lParam) MCIWND_START == lParam ? MCI_SEEK_TO_START :
{ MCIWND_END == lParam ? MCI_SEEK_TO_END : MCI_TO;
case MCIWND_START:
lParam = SendMessageW(hWnd, MCIWNDM_GETSTART, 0, 0);
break;
case MCIWND_END:
lParam = SendMessageW(hWnd, MCIWNDM_GETEND, 0, 0);
break;
}
mci_seek.dwTo = lParam; mci_seek.dwTo = lParam;
mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SEEK, mwi->lasterror = mciSendCommandW(mwi->mci, wMsg,
MCI_TO, (DWORD_PTR)&mci_seek); flags, (DWORD_PTR)&mci_seek);
if (mwi->lasterror) if (mwi->lasterror)
{ {
MCIWND_notify_error(mwi); MCIWND_notify_error(mwi);
return mwi->lasterror; return mwi->lasterror;
} }
/* update window to reflect the state */ /* update window to reflect the state */
InvalidateRect(hWnd, NULL, TRUE); else InvalidateRect(hWnd, NULL, TRUE);
return 0; return 0;
} }
@ -1364,15 +1357,9 @@ end_of_mci_open:
} }
case MCI_PAUSE: case MCI_PAUSE:
case MCI_STEP:
case MCI_STOP: case MCI_STOP:
case MCI_RESUME: case MCI_RESUME:
mci_generic_command(mwi, wMsg); mci_generic_command(mwi, wMsg);
if (wMsg == MCI_STEP && !mwi->lasterror)
{
/* update window to reflect the state */
InvalidateRect(hWnd, NULL, TRUE);
}
return mwi->lasterror; return mwi->lasterror;
case MCI_CONFIGURE: case MCI_CONFIGURE: