[PATCH v2 2/5] wine.inf: Move the Drivers32 section to the registry.

Zebediah Figura z.figura12 at gmail.com
Mon Jul 27 20:02:33 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at 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, &reg_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
-- 
2.27.0




More information about the wine-devel mailing list