Commit ce96eb79 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

msvfw32: MCI Step is like Seek.

parent 5f6962c7
...@@ -1298,30 +1298,23 @@ end_of_mci_open: ...@@ -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: ...@@ -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:
......
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