summarylogtreecommitdiffstats
path: root/proton-user_compat_data.patch
blob: 58b2aef04c2f42182e237f5ca3500d9611127aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/proton b/proton
index 7d75ff9..ca847ce 100755
--- a/proton
+++ b/proton
@@ -1277,6 +1277,15 @@ if __name__ == "__main__":
         log("No compat data path?")
         sys.exit(1)
 
+    if "PROTON_USER_COMPAT_DATA" in os.environ:
+        if nonzero(os.environ["PROTON_USER_COMPAT_DATA"]):
+            compatpath = os.environ["STEAM_COMPAT_DATA_PATH"].split('/')
+            os.environ["STEAM_COMPAT_DATA_PATH"] = "{}/{}/{}/{}".format(
+                os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"],
+                compatpath[-3], compatpath[-2], compatpath[-1])
+            if not os.path.exists(os.environ["STEAM_COMPAT_DATA_PATH"]):
+                os.makedirs(os.environ["STEAM_COMPAT_DATA_PATH"])
+
     g_proton = Proton(os.path.dirname(sys.argv[0]))
 
     g_proton.cleanup_legacy_dist()