This variable is the Wine's equivalent of the SDL_VIDEODRIVER/ SDL_VIDEO_DRIVER variable in SDL 2 and 3 (it explicitly selects a list of graphics/video drivers to be used).
From: Aida Jonikienė aidas957@gmail.com
This variable is the Wine's equivalent of the SDL_VIDEODRIVER/ SDL_VIDEO_DRIVER variable in SDL 2 and 3 (it explicitly selects a list of graphics/video drivers to be used). --- programs/explorer/desktop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index fb59258ad36..2046cdc7cc8 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -963,7 +963,7 @@ static void load_graphics_driver( const WCHAR *driver, GUID *guid ) { static const WCHAR device_keyW[] = L"System\CurrentControlSet\Control\Video\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\0000";
- WCHAR buffer[MAX_PATH], libname[32], *name, *next; + WCHAR buffer[MAX_PATH], *env_name, libname[32], *name, *next; WCHAR key[ARRAY_SIZE( device_keyW ) + 39]; BOOL null_driver = FALSE; HMODULE module = 0; @@ -975,7 +975,9 @@ static void load_graphics_driver( const WCHAR *driver, GUID *guid ) lstrcpyW( buffer, default_driver );
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */ - if (!RegOpenKeyW( HKEY_CURRENT_USER, L"Software\Wine\Drivers", &hkey )) + if ((env_name = _wgetenv( L"WINE_VIDEO_DRIVER" ) && env_name[0] != '\0') + lstrcpynW( buffer, env_name, ARRAY_SIZE( buffer )); + else if (!RegOpenKeyW( HKEY_CURRENT_USER, L"Software\Wine\Drivers", &hkey )) { DWORD count = sizeof(buffer); RegQueryValueExW( hkey, L"Graphics", 0, NULL, (LPBYTE)buffer, &count );
From: Aida Jonikienė aidas957@gmail.com
--- loader/wine.man.in | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/loader/wine.man.in b/loader/wine.man.in index 9d7822eaf88..10f068f7b19 100644 --- a/loader/wine.man.in +++ b/loader/wine.man.in @@ -235,6 +235,18 @@ WINE_D3D_CONFIG="renderer=vulkan;VideoPciVendorID=0xc0de" If an individual setting is specified in both the environment variable and the registry, the former takes precedence. .TP +.B WINE_VIDEO_DRIVER +Specifies the list of graphics drivers Wine should try to load. It +can be used instead of modifying the +.B HKEY_CURRENT_USER\\Software\\Wine\\Drivers\\Graphics +registry value. The value is a comma-separated list of driver names +(same as the registry one). For example: +.IP +WINE_VIDEODRIVER="x11,wayland" +.IP +If the driver list is specified in both the environment variable +and the registry, the former takes precedence. +.TP .B DISPLAY Specifies the X11 display to use. .TP