[WINMM] Apply Wine commit 6501113 by Jörg Höhle: MCI_ALL_DEVICE_ID(MCIDEVICEID) is...
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 20 Mar 2015 11:16:05 +0000 (11:16 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 20 Mar 2015 11:16:05 +0000 (11:16 +0000)
svn path=/trunk/; revision=66837

reactos/dll/win32/winmm/mci.c

index eda26b0..257d79e 100644 (file)
@@ -82,7 +82,7 @@ static inline LPWSTR str_dup_upper( LPCWSTR str )
 /**************************************************************************
  *                             MCI_GetDriver                   [internal]
  */
-static LPWINE_MCIDRIVER        MCI_GetDriver(UINT16 wDevID)
+static LPWINE_MCIDRIVER        MCI_GetDriver(UINT wDevID)
 {
     LPWINE_MCIDRIVER   wmd = 0;
 
@@ -1659,7 +1659,8 @@ static    DWORD MCI_Close(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
 
     TRACE("(%04x, %08X, %p)\n", wDevID, dwParam, lpParms);
 
-    if (wDevID == MCI_ALL_DEVICE_ID) {
+    /* Every device must handle MCI_NOTIFY on its own. */
+    if ((UINT16)wDevID == (UINT16)MCI_ALL_DEVICE_ID) {
        /* FIXME: shall I notify once after all is done, or for
         * each of the open drivers ? if the latest, which notif
         * to return when only one fails ?
@@ -1885,7 +1886,7 @@ DWORD     MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dw
         dwRet = MCI_Sound(wDevID, dwParam1, (LPMCI_SOUND_PARMSW)dwParam2);
        break;
     default:
-       if (wDevID == MCI_ALL_DEVICE_ID) {
+      if ((UINT16)wDevID == (UINT16)MCI_ALL_DEVICE_ID) {
            FIXME("unhandled MCI_ALL_DEVICE_ID\n");
            dwRet = MCIERR_CANNOT_USE_ALL;
        } else {