Commit 8e361310 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Changed how list of loadable MCI drivers is obtained.

parent 272be7b9
...@@ -252,28 +252,45 @@ BOOL MULTIMEDIA_MidiInit(void) ...@@ -252,28 +252,45 @@ BOOL MULTIMEDIA_MidiInit(void)
return TRUE; return TRUE;
} }
extern int mciInstalledCount;
extern int mciInstalledListLen;
extern LPSTR lpmciInstallNames;
BOOL MULTIMEDIA_MciInit(void) BOOL MULTIMEDIA_MciInit(void)
{ {
int len; LPSTR ptr1, ptr2;
LPSTR ptr; char buffer[1024];
LPSTR SysFile = "SYSTEM.INI";
mciInstalledCount = 0; mciInstalledCount = 0;
mciInstalledListLen = 0; ptr1 = lpmciInstallNames = xmalloc(2048);
ptr = lpmciInstallNames = xmalloc(2048);
/* FIXME: should do also some registry diving here */ /* FIXME: should do also some registry diving here */
GetPrivateProfileStringA("mci", NULL, "", lpmciInstallNames, 2000, SysFile); if (PROFILE_GetWineIniString("options", "mci", "", lpmciInstallNames, 2048) > 0) {
while (strlen(ptr) > 0) { TRACE(mci, "Wine => '%s' \n", ptr1);
TRACE(mci, "---> '%s' \n", ptr); while ((ptr2 = strchr(ptr1, ':')) != 0) {
len = strlen(ptr) + 1; *ptr2++ = 0;
ptr += len; TRACE(mci, "---> '%s' \n", ptr1);
mciInstalledListLen += len; mciInstalledCount++;
ptr1 = ptr2;
}
mciInstalledCount++;
TRACE(mci, "---> '%s' \n", ptr1);
ptr1 += strlen(ptr1) + 1;
} else {
GetPrivateProfileStringA("mci", NULL, "", lpmciInstallNames, 2048, "SYSTEM.INI");
while (strlen(ptr1) > 0) {
TRACE(mci, "---> '%s' \n", ptr1);
ptr1 += (strlen(ptr1) + 1);
mciInstalledCount++; mciInstalledCount++;
} }
}
mciInstalledListLen = ptr1 - lpmciInstallNames;
if (PROFILE_GetWineIniString("options", "mciExternal", "", buffer, sizeof(buffer)) > 0) {
int i;
for (i = 0; MCI_InternalDescriptors[i].uDevType != 0xFFFF; i++) {
if (strstr(buffer, MCI_InternalDescriptors[i].lpstrName) != NULL) {
MCI_InternalDescriptors[i].uDevType = 0; /* disable slot */
}
}
}
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment