From 51ad286d3708102c92ab046545f1d565ab9d5a34 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Tue, 28 Apr 2009 23:18:29 +0200 Subject: [PATCH] mciqtz32: Add support for MCI_SET. --- dlls/mciqtz32/mciqtz.c | 40 +++++++++++++++++++++++++++++++++- dlls/mciqtz32/mciqtz_private.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index 659cbc44be0..837122747c7 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -403,6 +403,44 @@ static DWORD MCIQTZ_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_P return MCI_RESOURCE_RETURNED; } +/*************************************************************************** + * MCIQTZ_mciSet [internal] + */ +static DWORD MCIQTZ_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms) +{ + WINE_MCIQTZ* wma; + + TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); + + if (!lpParms) + return MCIERR_NULL_PARAMETER_BLOCK; + + wma = MCIQTZ_mciGetOpenDev(wDevID); + if (!wma) + return MCIERR_INVALID_DEVICE_ID; + + if (dwFlags & MCI_SET_TIME_FORMAT) { + switch (lpParms->dwTimeFormat) { + case MCI_FORMAT_MILLISECONDS: + TRACE("MCI_SET_TIME_FORMAT = MCI_FORMAT_MILLISECONDS\n"); + wma->time_format = MCI_FORMAT_MILLISECONDS; + break; + case MCI_FORMAT_FRAMES: + TRACE("MCI_SET_TIME_FORMAT = MCI_FORMAT_FRAMES\n"); + wma->time_format = MCI_FORMAT_FRAMES; + break; + default: + WARN("Bad time format %u\n", lpParms->dwTimeFormat); + return MCIERR_BAD_TIME_FORMAT; + } + } + + if (dwFlags & ~MCI_SET_TIME_FORMAT) + FIXME("Flags not supported yet %08lX\n", dwFlags & ~MCI_SET_TIME_FORMAT); + + return 0; +} + /*************************************************************************** * MCIQTZ_mciStatus [internal] */ @@ -602,10 +640,10 @@ LRESULT CALLBACK MCIQTZ_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, case MCI_SEEK: return MCIQTZ_mciSeek (dwDevID, dwParam1, (LPMCI_SEEK_PARMS) dwParam2); case MCI_STOP: return MCIQTZ_mciStop (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); case MCI_GETDEVCAPS: return MCIQTZ_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS) dwParam2); + case MCI_SET: return MCIQTZ_mciSet (dwDevID, dwParam1, (LPMCI_DGV_SET_PARMS) dwParam2); case MCI_STATUS: return MCIQTZ_mciStatus (dwDevID, dwParam1, (LPMCI_DGV_STATUS_PARMSW) dwParam2); case MCI_WHERE: return MCIQTZ_mciWhere (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS) dwParam2); case MCI_RECORD: - case MCI_SET: case MCI_PAUSE: case MCI_RESUME: case MCI_INFO: diff --git a/dlls/mciqtz32/mciqtz_private.h b/dlls/mciqtz32/mciqtz_private.h index 23945a4ff5c..dcfcad0eb4a 100644 --- a/dlls/mciqtz32/mciqtz_private.h +++ b/dlls/mciqtz32/mciqtz_private.h @@ -31,6 +31,7 @@ typedef struct { IGraphBuilder* pgraph; IMediaControl* pmctrl; BOOL started; + DWORD time_format; } WINE_MCIQTZ; #endif /* __WINE_PRIVATE_MCIQTZ_H */