PATCH: mci getdriverfromstrng should be case insensitive

Marcus Meissner marcus at jet.franken.de
Sun Jun 10 15:56:32 CDT 2001


Hi,

This makes
	mciSendString("open cdaudio wait");
	mciSendString("status cdaudio ready");
work again. (mcicda registers itself as CDAUDIO.)

Now I have added case insensitive compares for alias and devicetype, but
not for element type (potential filename?). Dunno.

Ciao, Marcus

Changelog:
	Alias and Device Type are case insensitive.

Index: mci.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mci.c,v
retrieving revision 1.18
diff -u -r1.18 mci.c
--- mci.c	2001/05/09 17:31:34	1.18
+++ mci.c	2001/06/10 21:52:08
@@ -78,13 +78,11 @@
 	    ret = wmd->wDeviceID;
 	    break;
 	}
-	
-	if (wmd->lpstrDeviceType && strcmp(wmd->lpstrDeviceType, lpstrName) == 0) {
+	if (wmd->lpstrDeviceType && strcasecmp(wmd->lpstrDeviceType, lpstrName) == 0) {
 	    ret = wmd->wDeviceID;
 	    break;
 	}
-	
-	if (wmd->lpstrAlias && strcmp(wmd->lpstrAlias, lpstrName) == 0) {
+	if (wmd->lpstrAlias && strcasecmp(wmd->lpstrAlias, lpstrName) == 0) {
 	    ret = wmd->wDeviceID;
 	    break;
 	}




More information about the wine-patches mailing list