summaryrefslogtreecommitdiffhomepage
path: root/proto-wine/ftnoir_protocol_wine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'proto-wine/ftnoir_protocol_wine.cpp')
-rw-r--r--proto-wine/ftnoir_protocol_wine.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/proto-wine/ftnoir_protocol_wine.cpp b/proto-wine/ftnoir_protocol_wine.cpp
index 719da51f..ae7c6c31 100644
--- a/proto-wine/ftnoir_protocol_wine.cpp
+++ b/proto-wine/ftnoir_protocol_wine.cpp
@@ -57,15 +57,26 @@ module_status wine::initialize()
static const QString library_path(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH);
QString wine_path = "wine";
+ auto env = QProcessEnvironment::systemEnvironment();
+
if (s.variant_proton)
{
- QProcessEnvironment make_steam_environ(const QString& proton_version);
+ if (s.proton_appid == 0)
+ return error(tr("Must specify application id for Proton (Steam Play)"));
+
+ QProcessEnvironment make_steam_environ(const QString& proton_version, int appid);
QString proton_path(const QString& proton_version);
wine_path = proton_path(s.proton_version);
- wrapper.setProcessEnvironment(make_steam_environ(s.proton_version));
+ env = make_steam_environ(s.proton_version, s.proton_appid);
}
+ if (s.esync)
+ env.insert("WINEESYNC", "1");
+ if (s.fsync)
+ env.insert("WINEFSYNC", "1");
+
+ wrapper.setProcessEnvironment(env);
wrapper.setWorkingDirectory(OPENTRACK_BASE_PATH);
wrapper.start(wine_path, { library_path + "opentrack-wrapper-wine.exe.so" });
#endif