From 33bf4e8317cf434097ef50c716e71cc3259be51f Mon Sep 17 00:00:00 2001 From: Shaun Ren Date: Sat, 5 Oct 2024 23:38:21 -0400 Subject: [PATCH] steam_helper: Place Proton Voice Files path into PROTON_VOICE_FILES. Used by the protontts DLL for speech synthesis. CW-Bug-Id: #18723 CW-Bug-Id: #20918 CW-Bug-Id: #21959 CW-Bug-Id: #22520 CW-Bug-Id: #22894 --- steam_helper/steam.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index a083915e..9ac9af66 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -261,6 +261,23 @@ static void setup_eac_bridge(void) setenv("PROTON_EAC_RUNTIME", path, 1); } +static void setup_proton_voice_files(void) +{ + const unsigned int proton_voice_files_appid = 3086180; + char path[2048]; + char *path_end; + + if (!SteamApps()->BIsAppInstalled(proton_voice_files_appid)) + return; + + if (!SteamApps()->GetAppInstallDir(proton_voice_files_appid, path, sizeof(path))) + return; + + WINE_TRACE("Found proton voice files at %s\n", path); + + setenv("PROTON_VOICE_FILES", path, 1); +} + static std::string get_linux_vr_path(void) { const char *e; @@ -1728,6 +1745,7 @@ int main(int argc, char *argv[]) setup_steam_registry(); setup_battleye_bridge(); setup_eac_bridge(); + setup_proton_voice_files(); } else {