[PATCH v2] winex11.drv: Add video adapter description to the registry.

Dmitry Timoshkov dmitry at baikal.ru
Wed Oct 13 08:29:58 CDT 2021


Zhiyi Zhang <zzhang at codeweavers.com> wrote:

> > +    if (RegSetValueExW(hkey, adapter_stringW, 0, REG_SZ, (const BYTE *)gpu->name, (strlenW(gpu->name) + 1) * sizeof(WCHAR)))
> > +        goto done;
> > +    if (RegSetValueExW(hkey, bios_stringW, 0, REG_SZ, (const BYTE *)gpu->name, (strlenW(gpu->name) + 1) * sizeof(WCHAR)))
> > +        goto done;
> > +    if (RegSetValueExW(hkey, chip_typeW, 0, REG_SZ, (const BYTE *)gpu->name, (strlenW(gpu->name) + 1) * sizeof(WCHAR)))
> > +        goto done;
> > +    if (RegSetValueExW(hkey, dac_typeW, 0, REG_SZ, (const BYTE *)ramdacW, (strlenW(ramdacW) + 1) * sizeof(WCHAR)))
> > +        goto done;
> These values should be of type REG_BINARY.

The types are REG_BINARY in XP, however Windows 10 H1 on real hardware uses REG_SZ.

> The length of gpu->name is calculated multiple times. Let's avoid that.
> You can also replace "(strlenW(ramdacW) + 1) * sizeof(WCHAR)" with sizeof(ramdacW).

Fair enough.

-- 
Dmitry.



More information about the wine-devel mailing list