[PATCH 2/2] winmm: Dispatch MCI_BREAK to the driver (try 2)

Bruno Jesus 00cpxxx at gmail.com
Wed Mar 1 22:03:44 CST 2017


From: Bruno Jesus <bjesus at codeweavers.com>

try 2:
Fix trace (spotted by Sebastian Lackner)

Worms 2:
trace:mci:MCI_Break (00000001, 00000100, vkey 001B, hwnd 0x2003c)

Half-Life:
trace:mci:MCI_Break (00000002, 00000102, vkey 001B, hwnd (nil))
Signed-off-by: Bruno Jesus <bjesus at codeweavers.com>
---
 dlls/winmm/mci.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index b8adea6..1adea86 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -2060,13 +2060,18 @@ static	DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
  */
 static	DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms)
 {
+    DWORD dwRet;
+
     if (lpParms == NULL)
         return MCIERR_NULL_PARAMETER_BLOCK;
-    FIXME("(%04x) vkey %04X stub\n", dwFlags, lpParms->nVirtKey);
 
-    if (dwFlags & MCI_NOTIFY)
+    TRACE("(%08x, %08X, vkey %04X, hwnd %p)\n", wDevID, dwFlags,
+          lpParms->nVirtKey, lpParms->hwndBreak);
+
+    dwRet = MCI_SendCommandFrom32(wDevID, MCI_BREAK, dwFlags, (DWORD_PTR)lpParms);
+    if (!dwRet && (dwFlags & MCI_NOTIFY))
         mciDriverNotify((HWND)lpParms->dwCallback, wDevID, MCI_NOTIFY_SUCCESSFUL);
-    return MMSYSERR_NOERROR;
+    return dwRet;
 }
 
 /**************************************************************************
-- 
2.9.3




More information about the wine-patches mailing list