summaryrefslogtreecommitdiffhomepage
path: root/proto-wine/ftnoir_protocol_wine.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-10-27 07:25:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-10-28 07:45:44 +0100
commita5a2ec4f7a855ad35bde6362796a0a07fd419cf7 (patch)
tree60053965f601a5e14ba0f5eecc8e6f2c81ea26cc /proto-wine/ftnoir_protocol_wine.cpp
parent2716d8e2ae7df7fb99d9d64d1efaa554d1d38034 (diff)
proto/wine: add support for proton
Diffstat (limited to 'proto-wine/ftnoir_protocol_wine.cpp')
-rw-r--r--proto-wine/ftnoir_protocol_wine.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/proto-wine/ftnoir_protocol_wine.cpp b/proto-wine/ftnoir_protocol_wine.cpp
index 2e618ff9..ce6f6229 100644
--- a/proto-wine/ftnoir_protocol_wine.cpp
+++ b/proto-wine/ftnoir_protocol_wine.cpp
@@ -51,12 +51,24 @@ void wine::pose(const double *headpose, const double*)
}
}
+QProcessEnvironment make_steam_environ(const QString& proton_version);
+QString proton_path(const QString& proton_version);
+
module_status wine::initialize()
{
#ifndef OTR_WINE_NO_WRAPPER
static const QString library_path(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH);
+
+ QString wine_path = "wine";
+ auto env = QProcessEnvironment::systemEnvironment();
+ if (s.variant_proton)
+ {
+ env = make_steam_environ(s.proton_version);
+ wine_path = proton_path(s.proton_version);
+ }
+
wrapper.setWorkingDirectory(OPENTRACK_BASE_PATH);
- wrapper.start("wine", { library_path + "opentrack-wrapper-wine.exe.so" });
+ wrapper.start(wine_path, { library_path + "opentrack-wrapper-wine.exe.so" });
#endif
if (lck_shm.success())