Eric Pouech : mci: Fix some mciSendString quirks.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 26 07:12:42 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 6f03b0c021d5439d6a2c1610437c12877de8bcef
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=6f03b0c021d5439d6a2c1610437c12877de8bcef

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Sun Jun 25 16:04:19 2006 +0200

mci: Fix some mciSendString quirks.

Really check in MCI open string commands if the name we have is a
device (and no longer rely on bad heuristics for it).

---

 dlls/winmm/mci.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index 156cbaf..b981ab0 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -1285,6 +1285,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpst
     /* Determine devType from open */
     if (!strcmpW(verb, wszOpen)) {
 	LPWSTR	devType, tmp;
+        WCHAR	buf[128];
 
 	/* case dev == 'new' has to be handled */
 	if (!strcmpW(dev, wszNew)) {
@@ -1310,8 +1311,9 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpst
 	    devType = str_dup_upper(devType);
 	    dwFlags |= MCI_OPEN_ELEMENT;
 	    data[3] = (DWORD)dev;
-	} else if (strchrW(dev, '.') == NULL) {
-	    tmp = strchrW(dev,' ');
+	} else if (DRIVER_GetLibName(dev, wszMci, buf, sizeof(buf))) {
+            /* this is the name of a mci driver's type */
+	    tmp = strchrW(dev, ' ');
 	    if (tmp) *tmp = '\0';
 	    data[2] = (DWORD)dev;
 	    devType = str_dup_upper(dev);
@@ -1326,7 +1328,6 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpst
 		if (tmp) *tmp = ' ';
 		/* dwFlags and data[2] will be correctly set in ParseOpt loop */
 	    } else {
-		WCHAR	buf[32];
 		if ((dwRet = MCI_GetDevTypeFromFileName(dev, buf, sizeof(buf))))
 		    goto errCleanUp;
 




More information about the wine-cvs mailing list