[MCI] MCI strings are case insensitive
Christian Costa
titan.costa at wanadoo.fr
Mon Mar 15 16:34:14 CST 2004
Hi,
Changelog :
MCI strings are case insensitive.
Fixed a returned error value.
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: mci.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mci.c,v
retrieving revision 1.50
diff -u -r1.50 mci.c
--- mci.c 1 Jan 2004 00:48:01 -0000 1.50
+++ mci.c 15 Mar 2004 21:25:55 -0000
@@ -593,7 +593,7 @@
* array look up
*/
for (idx = 0; idx < S_MciCmdTable[uTbl].nVerbs; idx++) {
- if (strcmp(S_MciCmdTable[uTbl].aVerbs[idx], verb) == 0)
+ if (strcasecmp(S_MciCmdTable[uTbl].aVerbs[idx], verb) == 0)
return S_MciCmdTable[uTbl].aVerbs[idx];
}
@@ -885,6 +885,7 @@
if (!(verb = HeapAlloc(GetProcessHeap(), 0, strlen(lpstrCommand)+1)))
return MCIERR_OUT_OF_MEMORY;
strcpy( verb, lpstrCommand );
+ CharLowerA(verb);
memset(data, 0, sizeof(data));
@@ -898,7 +899,7 @@
}
/* case dev == 'new' has to be handled */
- if (!strcasecmp(dev, "new")) {
+ if (!strcmp(dev, "new")) {
FIXME("'new': NIY as device name\n");
dwRet = MCIERR_MISSING_DEVICE_NAME;
goto errCleanUp;
@@ -956,6 +957,8 @@
}
dwRet = MCI_LoadMciDriver(devType, &wmd);
+ if (dwRet == MCIERR_DEVICE_NOT_INSTALLED)
+ dwRet = MCIERR_INVALID_DEVICE_NAME;
HeapFree(GetProcessHeap(), 0, devType);
if (dwRet) {
MCI_UnLoadMciDriver(wmd);
More information about the wine-patches
mailing list