Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msacm32/internal.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/msacm32/internal.c b/dlls/msacm32/internal.c index 9c4d1a75f3b..d6797bec40a 100644 --- a/dlls/msacm32/internal.c +++ b/dlls/msacm32/internal.c @@ -359,7 +359,7 @@ void MSACM_RegisterAllDrivers(void) 'W','i','n','d','o','w','s',' ','N','T','\', 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\', 'D','r','i','v','e','r','s','3','2','\0'}; - DWORD i, cnt, bufLen, lRet, type; + DWORD i, cnt, bufLen, lRet; WCHAR buf[2048], valname[64], *name, *s; FILETIME lastWrite; HKEY hKey; @@ -380,15 +380,16 @@ void MSACM_RegisterAllDrivers(void) *name = 0; MSACM_RegisterDriver(buf, name + 1, 0); } - i = 0; - cnt = ARRAY_SIZE(valname); - bufLen = sizeof(buf); - while(RegEnumValueW(hKey, i, valname, &cnt, 0, - &type, (BYTE*)buf, &bufLen) == ERROR_SUCCESS){ - if (!wcsnicmp(valname, msacmW, ARRAY_SIZE(msacmW))) - MSACM_RegisterDriver(valname, buf, 0); - ++i; - } + + for (i = 0; ; i++) + { + cnt = ARRAY_SIZE(valname); + bufLen = sizeof(buf); + if (RegEnumValueW(hKey, i, valname, &cnt, 0, NULL, (BYTE *)buf, &bufLen)) + break; + if (!wcsnicmp(valname, msacmW, ARRAY_SIZE(msacmW))) + MSACM_RegisterDriver(valname, buf, 0); + } RegCloseKey( hKey ); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- The changes to msacm32 and msvfw32 need to be done in lockstep, to avoid reporting duplicate entries or omitting entries.
dlls/msacm32/internal.c | 15 +-------------- dlls/msvfw32/msvideo_main.c | 19 ------------------- loader/wine.inf.in | 22 +++++++++------------- 3 files changed, 10 insertions(+), 46 deletions(-)
diff --git a/dlls/msacm32/internal.c b/dlls/msacm32/internal.c index d6797bec40a..73fe51d739f 100644 --- a/dlls/msacm32/internal.c +++ b/dlls/msacm32/internal.c @@ -352,15 +352,13 @@ void MSACM_RegisterAllDrivers(void) { static const WCHAR msacm32[] = {'m','s','a','c','m','3','2','.','d','l','l','\0'}; static const WCHAR msacmW[] = {'M','S','A','C','M','.'}; - static const WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'}; - static const WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'}; static const WCHAR drvkey[] = {'S','o','f','t','w','a','r','e','\', 'M','i','c','r','o','s','o','f','t','\', 'W','i','n','d','o','w','s',' ','N','T','\', 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\', 'D','r','i','v','e','r','s','3','2','\0'}; DWORD i, cnt, bufLen, lRet; - WCHAR buf[2048], valname[64], *name, *s; + WCHAR buf[2048], valname[64], *name; FILETIME lastWrite; HKEY hKey;
@@ -393,17 +391,6 @@ void MSACM_RegisterAllDrivers(void) RegCloseKey( hKey ); }
- if (GetPrivateProfileSectionW(drv32, buf, ARRAY_SIZE(buf), sys)) - { - for(s = buf; *s; s += lstrlenW(s) + 1) - { - if (wcsnicmp(s, msacmW, ARRAY_SIZE(msacmW))) continue; - if (!(name = wcschr(s, '='))) continue; - *name = 0; - MSACM_RegisterDriver(s, name + 1, 0); - *name = '='; - } - } MSACM_ReorderDriversByPriority(); MSACM_RegisterDriver(msacm32, msacm32, 0); } diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c index e3a3300e5a1..905be6e5afb 100644 --- a/dlls/msvfw32/msvideo_main.c +++ b/dlls/msvfw32/msvideo_main.c @@ -308,25 +308,6 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info) RegCloseKey(key); }
- if (GetPrivateProfileSectionA("drivers32", buf, sizeof(buf), "system.ini")) - { - char *s; - for (s = buf; *s; s += strlen(s) + 1) - { - if (s[4] != '.' || s[9] != '=') continue; - ret_type = mmioStringToFOURCCA(s, 0); - ret_handler = mmioStringToFOURCCA(s + 5, 0); - if (type && compare_fourcc(type, ret_type)) continue; - if (compare_fourcc(handler, ret_handler) && handler != count++) continue; - - info->fccType = ret_type; - info->fccHandler = ret_handler; - MultiByteToWideChar(CP_ACP, 0, s + 10, -1, info->szDriver, ARRAY_SIZE(info->szDriver)); - TRACE("Returning codec %s, driver %s.\n", debugstr_an(s, 9), debugstr_a(s + 10)); - return TRUE; - } - } - LIST_FOR_EACH_ENTRY(driver, ®_driver_list, struct reg_driver, entry) { if (type && compare_fourcc(type, driver->fccType)) continue; diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 35992a01dfd..6f66f285569 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -556,7 +556,14 @@ HKLM,%CurrentVersionNT%,"RegisteredOrganization",2,"" HKLM,%CurrentVersionNT%,"RegisteredOwner",2,"" HKLM,%CurrentVersionNT%,"SystemRoot",,"%10%" HKLM,%CurrentVersionNT%\Console,,16 -HKLM,%CurrentVersionNT%\Drivers32,,16 +HKLM,%CurrentVersionNT%\Drivers32,"msacm.imaadpcm",,"imaadp32.acm" +HKLM,%CurrentVersionNT%\Drivers32,"msacm.l3acm",,"l3codeca.acm" +HKLM,%CurrentVersionNT%\Drivers32,"msacm.msadpcm",,"msadp32.acm" +HKLM,%CurrentVersionNT%\Drivers32,"msacm.msg711",,"msg711.acm" +HKLM,%CurrentVersionNT%\Drivers32,"msacm.msgsm610",,"msgsm32.acm" +HKLM,%CurrentVersionNT%\Drivers32,"vidc.cvid",,"iccvid.dll" +HKLM,%CurrentVersionNT%\Drivers32,"vidc.mrle",,"msrle32.dll" +HKLM,%CurrentVersionNT%\Drivers32,"vidc.msvc",,"msvidc32.dll" HKLM,%CurrentVersionNT%\FontDpi,,16 HKLM,%CurrentVersionNT%\FontLink,,16 HKLM,%CurrentVersionNT%\FontMapper,,16 @@ -565,6 +572,7 @@ HKLM,%CurrentVersionNT%\FontSubstitutes,,16 HKLM,%CurrentVersionNT%\Gre_Initialize,,16 HKLM,%CurrentVersionNT%\Hotfix\Q246009,"Installed",,"1" HKLM,%CurrentVersionNT%\Image File Execution Options,,16 +HKLM,%CurrentVersionNT%\IniFileMapping\system.ini,"drivers32",,"SYS:Microsoft\Windows NT\CurrentVersion\Drivers32" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"desktop",,"USR:Control Panel\Desktop" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"devices",,"USR:Software\Microsoft\Windows NT\CurrentVersion\Devices" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"extensions",,"USR:Software\Microsoft\Windows NT\CurrentVersion\Extensions" @@ -2734,18 +2742,6 @@ system.ini, mci,,"vcr=mcivisca.drv" system.ini, mci,,"; videodisc=mcipionr.drv" system.ini, mci,,"waveaudio=mciwave.dll"
-system.ini, drivers32,,"msacm.imaadpcm=imaadp32.acm" -system.ini, drivers32,,"msacm.msadpcm=msadp32.acm" -system.ini, drivers32,,"msacm.msg711=msg711.acm" -system.ini, drivers32,,"msacm.l3acm=l3codeca.acm" -system.ini, drivers32,,"msacm.msgsm610=msgsm32.acm" -system.ini, drivers32,,"vidc.mrle=msrle32.dll" -system.ini, drivers32,,"vidc.msvc=msvidc32.dll" -system.ini, drivers32,,"vidc.cvid=iccvid.dll" -system.ini, drivers32,,"; vidc.IV50=ir50_32.dll" -system.ini, drivers32,,"; vidc.IV31=ir32_32.dll" -system.ini, drivers32,,"; vidc.IV32=ir32_32.dll" - [Timezones] ; The timezone information (TZI field) comes from the Olson timezone database ; http://www.twinsun.com/tz/tz-link.htm
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msvideo.dll16/msvideo16.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c index 840de2efa8c..3618c0c49d5 100644 --- a/dlls/msvideo.dll16/msvideo16.c +++ b/dlls/msvideo.dll16/msvideo16.c @@ -874,7 +874,7 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len, DWORD verhandle; DWORD infosize; UINT subblocklen; - char *s, buf[2048], fn[260]; + char buf[2048], fn[260]; LPBYTE infobuf; LPVOID subblock; DWORD i, cnt = 0, lRet; @@ -903,19 +903,6 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len, RegCloseKey( hKey ); }
- /* search system.ini if not found in the registry */ - if (!found && GetPrivateProfileStringA("drivers32", NULL, NULL, buf, sizeof(buf), "system.ini")) - { - for (s = buf; *s; s += strlen(s) + 1) - { - if (_strnicmp(s, "vid", 3)) continue; - if (nr--) continue; - if (GetPrivateProfileStringA("drivers32", s, NULL, fn, sizeof(fn), "system.ini")) - found = TRUE; - break; - } - } - if (!found) { TRACE("No more VID* entries found nr=%d\n", nr);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winmm/mci.c | 16 +--------------- loader/wine.inf.in | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 29 deletions(-)
diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 870f5d1ca24..1bd957dc4af 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -67,7 +67,6 @@ static const WCHAR wszNull [] = {0}; static const WCHAR wszAll [] = {'A','L','L',0}; static const WCHAR wszMci [] = {'M','C','I',0}; static const WCHAR wszOpen [] = {'o','p','e','n',0}; -static const WCHAR wszSystemIni[] = {'s','y','s','t','e','m','.','i','n','i',0};
static WINE_MCIDRIVER *MciDrivers;
@@ -1907,7 +1906,7 @@ static DWORD MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr) static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParms) { DWORD ret = MCIERR_INVALID_DEVICE_ID, cnt = 0; - WCHAR buf[2048], *s, *p; + WCHAR buf[2048], *s; LPWINE_MCIDRIVER wmd; HKEY hKey;
@@ -1940,8 +1939,6 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm RegQueryInfoKeyW( hKey, 0, 0, 0, &cnt, 0, 0, 0, 0, 0, 0, 0); RegCloseKey( hKey ); } - if (GetPrivateProfileStringW(wszMci, 0, wszNull, buf, ARRAY_SIZE(buf), wszSystemIni)) - for (s = buf; *s; s += lstrlenW(s) + 1) cnt++; } } else { if (dwFlags & MCI_SYSINFO_OPEN) { @@ -2017,17 +2014,6 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm } RegCloseKey( hKey ); } - if (!s) { - if (GetPrivateProfileStringW(wszMci, 0, wszNull, buf, ARRAY_SIZE(buf), wszSystemIni)) { - for (p = buf; *p; p += lstrlenW(p) + 1, cnt++) { - TRACE("%d: %s\n", cnt, debugstr_w(p)); - if (cnt == lpParms->dwNumber - 1) { - s = p; - break; - } - } - } - } ret = s ? MCI_WriteString(lpParms->lpstrReturn, lpParms->dwRetSize, s) : MCIERR_OUTOFRANGE; } else { FIXME("MCI_SYSINFO_NAME: nth device of type %d\n", lpParms->wDeviceType); diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 6f66f285569..01a4d259777 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -29,7 +29,6 @@ signature="$CHICAGO$" [DefaultInstall] RegisterDlls=RegisterDllsSection WineFakeDlls=FakeDllsWin32,FakeDlls -UpdateInis=SystemIni CopyFiles=InfFiles,NlsFiles,SortFiles AddReg=\ Classes,\ @@ -53,7 +52,6 @@ AddReg=\ [DefaultInstall.NT] RegisterDlls=RegisterDllsSection WineFakeDlls=FakeDllsWin32,FakeDlls -UpdateInis=SystemIni CopyFiles=InfFiles,NlsFiles,SortFiles AddReg=\ Classes,\ @@ -79,7 +77,6 @@ AddReg=\ RegisterDlls=RegisterDllsSection WineFakeDlls=FakeDllsWin64,FakeDlls WinePreInstall=Wow64 -UpdateInis=SystemIni CopyFiles=InfFiles,NlsFiles,SortFiles AddReg=\ Classes,\ @@ -106,7 +103,6 @@ AddReg=\ RegisterDlls=RegisterDllsSection WineFakeDlls=FakeDllsWin64,FakeDlls WinePreInstall=Wow64 -UpdateInis=SystemIni CopyFiles=InfFiles,NlsFiles,SortFiles AddReg=\ Classes,\ @@ -573,6 +569,7 @@ HKLM,%CurrentVersionNT%\Gre_Initialize,,16 HKLM,%CurrentVersionNT%\Hotfix\Q246009,"Installed",,"1" HKLM,%CurrentVersionNT%\Image File Execution Options,,16 HKLM,%CurrentVersionNT%\IniFileMapping\system.ini,"drivers32",,"SYS:Microsoft\Windows NT\CurrentVersion\Drivers32" +HKLM,%CurrentVersionNT%\IniFileMapping\system.ini,"mci",,"SYS:Microsoft\Windows NT\CurrentVersion\MCI" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"desktop",,"USR:Control Panel\Desktop" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"devices",,"USR:Software\Microsoft\Windows NT\CurrentVersion\Devices" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"extensions",,"USR:Software\Microsoft\Windows NT\CurrentVersion\Extensions" @@ -581,6 +578,13 @@ HKLM,%CurrentVersionNT%\IniFileMapping\win.ini,"sounds",,"USR:Control Panel\Soun HKLM,%CurrentVersionNT%\IniFileMapping\win.ini\windows,,,"USR:Software\Microsoft\Windows NT\CurrentVersion\Windows" HKLM,%CurrentVersionNT%\IniFileMapping\win.ini\windows,"CursorBlinkRate",,"USR:Control Panel\Desktop" HKLM,%CurrentVersionNT%\LanguagePack,,16 +HKLM,%CurrentVersionNT%\MCI,"avivideo",,"mciavi32.dll" +HKLM,%CurrentVersionNT%\MCI,"cdaudio",,"mcicda.dll" +HKLM,%CurrentVersionNT%\MCI,"mpegvideo",,"mciqtz32.dll" +HKLM,%CurrentVersionNT%\MCI,"mpegvideo2",,"mciqtz32.dll" +HKLM,%CurrentVersionNT%\MCI,"sequencer",,"mciseq.dll" +HKLM,%CurrentVersionNT%\MCI,"vcr",,"mcivisca.drv" +HKLM,%CurrentVersionNT%\MCI,"waveaudio",,"mciwave.dll" HKLM,%CurrentVersionNT%\NetworkCards,,16 HKLM,%CurrentVersionNT%\OpenGLDrivers,,16 HKLM,%CurrentVersionNT%\Perflib,,16 @@ -2732,16 +2736,6 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 16427,System\ADO,msado15.dll 11,,*
-[SystemIni] -system.ini, mci,,"MPEGVideo=mciqtz32.dll" -system.ini, mci,,"MPEGVideo2=mciqtz32.dll" -system.ini, mci,,"avivideo=mciavi32.dll" -system.ini, mci,,"cdaudio=mcicda.dll" -system.ini, mci,,"sequencer=mciseq.dll" -system.ini, mci,,"vcr=mcivisca.drv" -system.ini, mci,,"; videodisc=mcipionr.drv" -system.ini, mci,,"waveaudio=mciwave.dll" - [Timezones] ; The timezone information (TZI field) comes from the Olson timezone database ; http://www.twinsun.com/tz/tz-link.htm
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winmm/driver.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/dlls/winmm/driver.c b/dlls/winmm/driver.c index 24db0edc37a..0a1ef05f90d 100644 --- a/dlls/winmm/driver.c +++ b/dlls/winmm/driver.c @@ -246,8 +246,6 @@ BOOL DRIVER_GetLibName(LPCWSTR keyName, LPCWSTR sectName, LPWSTR buf, int sz) { HKEY hKey, hSecKey; DWORD bufLen, lRet; - static const WCHAR wszSystemIni[] = {'S','Y','S','T','E','M','.','I','N','I',0}; - WCHAR wsznull = '\0';
TRACE("registry: %s, %s, %p, %d\n", debugstr_w(keyName), debugstr_w(sectName), buf, sz);
@@ -261,12 +259,7 @@ BOOL DRIVER_GetLibName(LPCWSTR keyName, LPCWSTR sectName, LPWSTR buf, int sz) } RegCloseKey( hKey ); } - if (lRet == ERROR_SUCCESS) return TRUE; - - /* default to system.ini if we can't find it in the registry, - * to support native installations where system.ini is still used */ - TRACE("system.ini: %s, %s, %p, %d\n", debugstr_w(keyName), debugstr_w(sectName), buf, sz); - return GetPrivateProfileStringW(sectName, keyName, &wsznull, buf, sz / sizeof(WCHAR), wszSystemIni); + return !lRet; }
/**************************************************************************