Set PROTON_CPU_TOPOLOGY too so Proton's per-game CPU list doesn't replace it

Proton sets WINE_CPU_TOPOLOGY from its own default_cpu_limit for games
like Prototype (8 cores) unless PROTON_CPU_TOPOLOGY is set, so the
pinned topology never reached the game the issue was about.
This commit is contained in:
maxjivi05 authored and MaxsTechReview committed 2026-10-26 18:31:11 -04:00
1 parent 43266b2923
commit 70c512693a
2 files changed
+12 -10

No files matched your search

@@ -352,7 +352,7 @@ def game_cores(env):
def cpu_topology(env):
if "WINE_CPU_TOPOLOGY" in env or not (env.get("DROIDDECK_GAME_CORES", "").strip() or env.get("BL_GAME_CPUS", "").strip()):
if "WINE_CPU_TOPOLOGY" in env or "PROTON_CPU_TOPOLOGY" in env or not (env.get("DROIDDECK_GAME_CORES", "").strip() or env.get("BL_GAME_CPUS", "").strip()):
return
try:
cores = sorted(os.sched_getaffinity(0))
@@ -361,7 +361,7 @@ def cpu_topology(env):
online = online_cores()
if not cores or set(cores) >= online or cores[-1] >= len(online):
return
env["WINE_CPU_TOPOLOGY"] = "%d:%s" % (len(cores), ",".join(map(str, cores)))
env["WINE_CPU_TOPOLOGY"] = env["PROTON_CPU_TOPOLOGY"] = "%d:%s" % (len(cores), ",".join(map(str, cores)))
print("droiddeck-game-env: Windows sees %d cores (%s)" % (len(cores), env["WINE_CPU_TOPOLOGY"]), file=sys.stderr)