[PATCH v6 0/2] MR5231: ntdll: Add SDL_AUDIO*/SDL_VIDEO* to the special variables list.
Overriding the SDL_VIDEODRIVER variable (for Wayland support as an example) on the Linux side can lead to some games under Wine failing to load (so treat that variable as special). -- v6: ntdll: Add SDL audio driver variables to the special variables list. ntdll: Add SDL video driver variables to the special variables list. https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
From: Aida Jonikienė <aidas957(a)gmail.com> Overriding the SDL_VIDEODRIVER variable (for Wayland support as an example) on the Linux side can lead to some games under Wine failing to load (so treat that variable as special). --- dlls/ntdll/unix/env.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 36949b905fb..edb0fc4237b 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -341,6 +341,8 @@ static BOOL is_special_env_var( const char *var ) STARTS_WITH( var, "TEMP=" ) || STARTS_WITH( var, "TMP=" ) || STARTS_WITH( var, "QT_" ) || + STARTS_WITH( var, "SDL_VIDEODRIVER=" ) || + STARTS_WITH( var, "SDL_VIDEO_DRIVER=" ) || STARTS_WITH( var, "VK_" ) || STARTS_WITH( var, "XDG_SESSION_TYPE=" )); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
From: Aida Jonikienė <aidas957(a)gmail.com> This has the same issue as the video driver variable (but on a smaller scale because games more rarely use SDL for audio). --- dlls/ntdll/unix/env.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index edb0fc4237b..87670b004df 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -341,6 +341,8 @@ static BOOL is_special_env_var( const char *var ) STARTS_WITH( var, "TEMP=" ) || STARTS_WITH( var, "TMP=" ) || STARTS_WITH( var, "QT_" ) || + STARTS_WITH( var, "SDL_AUDIODRIVER=" ) || + STARTS_WITH( var, "SDL_AUDIO_DRIVER=" ) || STARTS_WITH( var, "SDL_VIDEODRIVER=" ) || STARTS_WITH( var, "SDL_VIDEO_DRIVER=" ) || STARTS_WITH( var, "VK_" ) || -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
Please check this alternative MR !6166. Would this work for you too ? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5231#note_77200
I don't know, this looks okay but it's also possible to use these variables to control the SDL Win32 backends, which this change would break. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5231#note_77782
My understanding of the code in function get_initial_environment(...) in upstream, is that any environment variable with prefix "WINE" (e.g. "WINEXXX=abc") would propagate as env XXX=abc to the application (Win32 backend?). This seems to be the intended way to disentangle envvar targetting WINE and targetting its application. Is anyone using this mechanism ? If I understand this correctly, providing ``` WINESDL_AUDIODRIVER WINESDL_AUDIO_DRIVER WINESDL_VIDEODRIVER WINESDL_VIDEO_DRIVER ``` would be an suitable alternative to this MR (!5231). Or do I miss anything ? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5231#note_80860
@schloegl setting `WINESDL_AUDIODRIVER` and `WINESDL_VIDEODRIVER` doesn't seem to work for me. I have issues with Frostpunk, which is using SDL. I have SDL_VIDEODRIVER=wayland and SDL_AUDIODRIVER=pulse in my Linux, and I want them to be unset when I'm running games via Wine. Frostpunk works via `SDL_VIDEODRIVER= SDL_AUDIODRIVER= wine-vanilla-9.20 ~/.wine/drive_c/GOG\ Games/Frostpunk/Frostpunk.exe`, but doesn't work via `WINESDL_VIDEODRIVER= WINESDL_AUDIODRIVER= wine-vanilla-9.20 ~/.wine/drive_c/GOG\ Games/Frostpunk/Frostpunk.exe`. Same result for video driver `windows` and audio driver `directsound` - works if I'm setting them via SDL_ vars, doesn't work if I'm setting them via WINESDL. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5231#note_87868
participants (4)
-
Aida Jonikienė -
Alois Schloegl (@schloegl) -
Rémi Bernon -
Yaroslav Isakov (@yaroslav.isakov)