From 7ff3867904b05e2a710f8bd12364befcaacf2fea Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Fri, 3 Nov 2023 15:23:49 -0600
Subject: [PATCH] proton: Fix noforcelgadd option.

Code in Wine still enables the hack when WINE_LARGE_ADDRESS_AWARE is
missing, need to set it to non-'1' to really disable.

CW-Bug-Id: #22930
---
 proton | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/proton b/proton
index aba5c501..ed9a64ac 100755
--- a/proton
+++ b/proton
@@ -1430,6 +1430,9 @@ class Session:
 
         if "forcelgadd" in self.compat_config:
             self.env["WINE_LARGE_ADDRESS_AWARE"] = "1"
+        else:
+            if "noforcelgadd" in self.compat_config:
+                self.env["WINE_LARGE_ADDRESS_AWARE"] = "0"
 
         if "heapdelayfree" in self.compat_config:
             self.env["WINE_HEAP_DELAY_FREE"] = "1"