Some applications (e.g. UE4) requires the DriverVersion string in the registry. The string is taken from `dlls/wbemprox/builtin.c`
-- v3: win32u: Add DriverVersion string for GPUs to registry
From: Michael Skorokhodov mykhailo.skorokhodov@globallogic.com
Some applications (e.g. UE4) requires the DriverVersion string in the registry.
Signed-off-by: Mykhailo Skorokhodov mykhailo.skorokhodov@globallogic.com --- dlls/win32u/sysparams.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 233e5bb934b..5cdbb8b2e10 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1230,6 +1230,8 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) static const WCHAR ramdacW[] = {'I','n','t','e','r','g','r','a','t','e','d',' ','R','A','M','D','A','C',0}; static const WCHAR driver_dateW[] = {'D','r','i','v','e','r','D','a','t','e',0}; + static const WCHAR driver_versionW[] = + {'D','r','i','v','e','r','V','e','r','s','i','o','n',0};
TRACE( "%s %04X %04X %08X %02X\n", debugstr_w(gpu->name), gpu->vendor_id, gpu->device_id, gpu->subsys_id, gpu->revision_id ); @@ -1374,6 +1376,30 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) set_reg_value( hkey, chip_typeW, REG_BINARY, desc, size ); set_reg_value( hkey, dac_typeW, REG_BINARY, ramdacW, sizeof(ramdacW) );
+ if (gpu->vendor_id && gpu->device_id) + { + switch (gpu->vendor_id) + { + /* Intel */ + case 0x8086: + sprintf(buffer, "31.0.101.4576"); + break; + /* AMD */ + case 0x1002: + sprintf(buffer, "31.0.14051.5006"); + break; + /* NVidia */ + case 0x10de: + sprintf(buffer, "31.0.15.3625"); + break; + default: + /* Default value for any other vendor */ + sprintf(buffer, "31.0.10.1000"); + break; + } + set_reg_value( hkey, driver_versionW, REG_SZ, bufferW, asciiz_to_unicode( bufferW, buffer )); + } + NtClose( hkey );
link_device( ctx->gpuid, guid_devinterface_display_adapterW );
On Wed Jun 21 09:32:25 2023 +0000, Michael Skorokhodov wrote:
It might be good, but that variable doesn't contain any ID, only zero. I tried running games and applications. Probably, it could work in ValveSoftware/Wine when they update their repository.
I did it, and it should work on Proton.