From aa7971ba24f063854f4d96f0d0a0f422fa9f0dc2 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Thu, 12 Oct 2000 20:40:56 +0000 Subject: [PATCH] MCICDA didn't open/close the door when calling the command without valid parameter block (i.e. == NULL). --- dlls/winmm/mcicda/mcicda.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/winmm/mcicda/mcicda.c b/dlls/winmm/mcicda/mcicda.c index fa39c0c4b27..f8bb0e1cfb2 100644 --- a/dlls/winmm/mcicda/mcicda.c +++ b/dlls/winmm/mcicda/mcicda.c @@ -718,6 +718,15 @@ static DWORD MCICDA_Set(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) TRACE("(%04X, %08lX, %p);\n", wDevID, dwFlags, lpParms); if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID; + + if (dwFlags & MCI_SET_DOOR_OPEN) { + MCICDA_SetDoor(wDevID, TRUE); + } + if (dwFlags & MCI_SET_DOOR_CLOSED) { + MCICDA_SetDoor(wDevID, FALSE); + } + + /* only functions which require valid lpParms below this line ! */ if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; /* TRACE("dwTimeFormat=%08lX\n", lpParms->dwTimeFormat); @@ -740,12 +749,6 @@ static DWORD MCICDA_Set(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms) } wmcda->dwTimeFormat = lpParms->dwTimeFormat; } - if (dwFlags & MCI_SET_DOOR_OPEN) { - MCICDA_SetDoor(wDevID, TRUE); - } - if (dwFlags & MCI_SET_DOOR_CLOSED) { - MCICDA_SetDoor(wDevID, FALSE); - } if (dwFlags & MCI_SET_VIDEO) return MCIERR_UNSUPPORTED_FUNCTION; if (dwFlags & MCI_SET_ON) return MCIERR_UNSUPPORTED_FUNCTION; if (dwFlags & MCI_SET_OFF) return MCIERR_UNSUPPORTED_FUNCTION;