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
This commit is contained in:
Shaun Ren 2024-10-05 23:38:21 -04:00
parent 5c8d3d0568
commit cbd18be61f

View File

@ -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
{