about summary refs log tree commit diff stats
path: root/src/tools/env.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-06-08 16:41:51 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-06-08 16:41:51 +0200
commit873be3cf879e3635a996bcdc34b3e3a6c15969a0 (patch)
tree6f75051a27b56cb9ecbf1a22e0f5042b10177db3 /src/tools/env.c
parent685afa230291d64f350afbfdfa8fc82536d99f82 (diff)
downloadbox64-873be3cf879e3635a996bcdc34b3e3a6c15969a0.tar.gz
box64-873be3cf879e3635a996bcdc34b3e3a6c15969a0.zip
[RCFILE] Fixed MAXCPU so it works for wine apps too
Diffstat (limited to 'src/tools/env.c')
-rw-r--r--src/tools/env.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/env.c b/src/tools/env.c
index ed1bf326..3cd12818 100644
--- a/src/tools/env.c
+++ b/src/tools/env.c
@@ -121,6 +121,7 @@ static void parseRange(const char* s, uintptr_t* start, uintptr_t* end)
 }
 
 void AddNewLibs(const char* list);
+int canNCpuBeChanged();
 
 static void applyCustomRules()
 {
@@ -196,8 +197,9 @@ static void applyCustomRules()
 #endif
     }
 
-    if (box64env.maxcpu == 0 || (!box64_wine && box64env.new_maxcpu < box64env.maxcpu)) {
-        box64env.maxcpu = box64env.new_maxcpu;
+    if (box64env.maxcpu == 0 || (box64env.new_maxcpu < box64env.maxcpu)) {
+        if(canNCpuBeChanged())
+            box64env.maxcpu = box64env.new_maxcpu;
     }
 
 #ifndef _WIN32