Commit 7b0d8651 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

mciqtz32: "status mode" returns resource strings.

parent 8f6650cb
......@@ -605,6 +605,7 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS
{
WINE_MCIQTZ* wma;
HRESULT hr;
DWORD ret = MCI_INTEGER_RETURNED;
TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
......@@ -663,30 +664,33 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS
LONG state = State_Stopped;
IMediaControl_GetState(wma->pmctrl, -1, &state);
if (state == State_Stopped)
lpParms->dwReturn = MCI_MODE_STOP;
lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP);
else if (state == State_Running) {
LONG code;
LONG_PTR p1, p2;
lpParms->dwReturn = MCI_MODE_PLAY;
lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_PLAY, MCI_MODE_PLAY);
do {
hr = IMediaEvent_GetEvent(wma->mevent, &code, &p1, &p2, 0);
if (hr == S_OK && code == EC_COMPLETE){
lpParms->dwReturn = MCI_MODE_STOP;
lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP);
IMediaControl_Stop(wma->pmctrl);
}
} while (hr == S_OK);
} else if (state == State_Paused)
lpParms->dwReturn = MCI_MODE_PAUSE;
lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_PAUSE, MCI_MODE_PAUSE);
ret = MCI_RESOURCE_RETURNED;
break;
}
case MCI_STATUS_MEDIA_PRESENT:
FIXME("MCI_STATUS_MEDIA_PRESENT not implemented yet\n");
return MCIERR_UNRECOGNIZED_COMMAND;
case MCI_STATUS_TIME_FORMAT:
lpParms->dwReturn = wma->time_format;
lpParms->dwReturn = MAKEMCIRESOURCE(wma->time_format,
MCI_FORMAT_RETURN_BASE + wma->time_format);
ret = MCI_RESOURCE_RETURNED;
break;
case MCI_STATUS_READY:
FIXME("MCI_STATUS_READY not implemented yet\n");
......@@ -702,7 +706,7 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS
if (dwFlags & MCI_NOTIFY)
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
return 0;
return ret;
}
/***************************************************************************
......
......@@ -1319,7 +1319,7 @@ static void test_playWaveTypeMpegvideo(void)
err = mciSendStringA("status mysound mode", buf, sizeof(buf), NULL);
ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
todo_wine ok(!strcmp(buf,"playing"), "mci status mode: %s\n", buf);
ok(!strcmp(buf,"playing"), "mci status mode: %s\n", buf);
status_parm.dwItem = MCI_STATUS_MODE;
err = mciSendCommandA(wDeviceID, MCI_STATUS,
......
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