Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

Merge upstream/main into integrate (ray.28)

raymondchins78f72cfc8daa
diff --cc Makefile
index 353780b,47f5d37..9463732
--- a/Makefile
+++ b/Makefile
@@@ -67,8 -68,7 +68,8 @@@ DEPS := $(OBJS:.o=.d
tests-list overlay-shim overlay-shim-install overlay-shim-tests \
overlay-shim-bench iconmaker icon \
appinfo helpers-install ntdll-resolve bridge runcheck compatcheck \
- compatsvc-check shortcutcheck scriptcheck envcheck buildcheck settingscheck routecheck bridgecheck gamedrivecheck launchercheck launch-shell activatecheck FORCE
+ compatsvc-check shortcutcheck scriptcheck envcheck buildcheck settingscheck routecheck bridgecheck gamedrivecheck \
- gamefixescheck launchercheck padcheck launch-shell FORCE
++ gamefixescheck launchercheck padcheck launch-shell activatecheck FORCE
APP_PAYLOAD := app/Sources/NotProtonApp/Resources/payload
diff --cc app/Package.swift
index 6db017d,ab85fa1..029e6e0
--- a/app/Package.swift
+++ b/app/Package.swift
@@@ -40,26 -40,11 +40,31 @@@ let package = Package
.copy("Resources/detour2-fex-41069.bin"),
.copy("Resources/detour32-fex-41069.bin"),
.copy("Resources/detour64-fex-41069.bin"),
+ .copy("Resources/detour2-winehq-11.15.bin"),
+ .copy("Resources/detour32-winehq-11.15.bin"),
+ .copy("Resources/winemac-winehq-11.15.so"),
+ .copy("Resources/detour2-winecx-11.15.bin"),
+ .copy("Resources/detour32-winecx-11.15.bin"),
+ .copy("Resources/winemac-winecx-11.15.so"),
+ .copy("Resources/winebus-winecx-11.15.so"),
+ .copy("Resources/detour2-winecx-11.17.bin"),
+ .copy("Resources/detour32-winecx-11.17.bin"),
+ .copy("Resources/winemac-winecx-11.17.so"),
+ .copy("Resources/winebus-winecx-11.17.so"),
+ .copy("Resources/winebus-winecx-11.17.sys"),
+ .copy("Resources/ws2_32-winecx-11.17.dll"),
+ .copy("Resources/crypt32-winecx-11.17.dll"),
+ .copy("Resources/wintrust-winecx-11.17.dll"),
+ .copy("Resources/nvapi64-shim.dll"),
+ .copy("Resources/win32u-winecx-11.17.so"),
+ .copy("Resources/wined3d-winecx-11.17.dll"),
+ .copy("Resources/winecoreaudio-winecx-11.17.so"),
+ .copy("Resources/libSDL2-2.0.0.dylib"),
+ .copy("Resources/detour2-41073.bin"),
+ .copy("Resources/detour32-41073.bin"),
+ .copy("Resources/detour2-fex-41073.bin"),
+ .copy("Resources/detour32-fex-41073.bin"),
+ .copy("Resources/detour64-fex-41073.bin"),
],
swiftSettings: [.swiftLanguageMode(.v6)]
),
diff --cc app/Sources/NotProtonApp/Model/NtdllPatcher.swift
index 45a580f,867bfef..282573c
--- a/app/Sources/NotProtonApp/Model/NtdllPatcher.swift
+++ b/app/Sources/NotProtonApp/Model/NtdllPatcher.swift
@@@ -252,40 -252,89 +252,122 @@@ enum NtdllPatcher
imageBase: 0x1_8000_0000
),
],
+ "winehq-11.15": [
+ NtdllPatch(
+ arch: .x86_64Windows,
+ payloadResource: "detour2-winehq-11.15",
+ payloadSHA256: "d394a6b7f4c55e2bb8b99aeb51cd4555527f8e10fa49339e95a8156486c5e2e5",
+ caveRVA: 0xb3000,
+ payloadRVA: 0xb3000,
+ hooks: [
+ NtdllHook(rva: 0x3512c, stolen: [0x48, 0x8b, 0x85, 0x90, 0x00, 0x00, 0x00]),
+ ],
+ caveSize: 0x1000,
+ cavePad: 0x00,
+ machine: 0x8664,
+ magic: 0x20b,
+ imageBase: 0x1_7000_0000,
+ placement: .section
+ ),
+ NtdllPatch(
+ arch: .i386Windows,
+ payloadResource: "detour32-winehq-11.15",
+ payloadSHA256: "527431a3a74e9dff7bc3582277ddfa7b44bcac6fba285c028fd2c94fd9202418",
+ caveRVA: 0x6a075,
+ payloadRVA: 0x6a080,
+ hooks: [
+ NtdllHook(rva: 0x2edcd, stolen: [0x8b, 0x45, 0x14, 0xa8, 0x02]),
+ ],
+ caveSize: 3979,
+ cavePad: 0xcc,
+ machine: 0x14c,
+ magic: 0x10b,
+ imageBase: 0x7bc0_0000
+ ),
+ ],
+ "27.0.0.41073": [
+ NtdllPatch(
+ arch: .x86_64Windows,
+ payloadResource: "detour2-41073",
+ payloadSHA256: "971c9c8c0f5a9fc7338fb5012a88f8a5297924e48cadb0aa0fa827cce0984a6e",
+ caveRVA: 0x814a0,
+ payloadRVA: 0x814a0,
+ hooks: [
+ NtdllHook(rva: 0x51f15,
+ stolen: [0x48, 0x83, 0xbc, 0x24, 0xf0, 0x00, 0x00, 0x00, 0x00]),
+ ],
+ caveSize: 2912,
+ cavePad: 0x00,
+ machine: 0x8664,
+ magic: 0x20b,
+ imageBase: 0x1_7000_0000
+ ),
+ NtdllPatch(
+ arch: .i386Windows,
+ payloadResource: "detour32-41073",
+ payloadSHA256: "693d6b8ac801c5697dc7d86aeb4f23fbfb1fd08bb3f949ad3e4b2311cd28348a",
+ caveRVA: 0x7d070,
+ payloadRVA: 0x7d070,
+ hooks: [
+ NtdllHook(rva: 0x4d6c8, stolen: [0xf6, 0x45, 0xbc, 0x02, 0x75, 0x26]),
+ ],
+ caveSize: 3984,
+ cavePad: 0x00,
+ machine: 0x14c,
+ magic: 0x10b,
+ imageBase: 0x7bc0_0000
+ ),
+ ],
+ "27.0.0.41073-fex": [
+ NtdllPatch(
+ arch: .x86_64Windows,
+ payloadResource: "detour2-fex-41073",
+ payloadSHA256: "d3b922ad4eae11d9a95cdab1276546af08bd3b28e041427ea0ebc557b094ad32",
+ caveRVA: 0x79ba4,
+ payloadRVA: 0x79bb0,
+ hooks: [
+ NtdllHook(rva: 0x3499e, stolen: [0x48, 0x8b, 0x84, 0x24, 0x10, 0x01, 0x00, 0x00]),
+ ],
+ caveSize: 1116,
+ cavePad: 0xcc,
+ machine: 0x8664,
+ magic: 0x20b,
+ imageBase: 0x1_7000_0000
+ ),
+ NtdllPatch(
+ arch: .i386Windows,
+ payloadResource: "detour32-fex-41073",
+ payloadSHA256: "e0b3a73bb287ecdebe7a9516a732b60e8de95fa0a756ae5ea4c5bd46e4a807c2",
+ caveRVA: 0xa4000,
+ payloadRVA: 0xa4000,
+ hooks: [
+ NtdllHook(rva: 0x2ecf2, stolen: [0x8b, 0x45, 0x14, 0xa8, 0x02]),
+ ],
+ caveSize: 0x1000,
+ cavePad: 0x00,
+ machine: 0x14c,
+ magic: 0x10b,
+ imageBase: 0x7bc0_0000,
+ placement: .section
+ ),
+ NtdllPatch(
+ arch: .aarch64Windows,
+ payloadResource: "detour64-fex-41073",
+ payloadSHA256: "8a6fe80587815393059cb2cecfdc542b666c158e147560875ff19f37221726d2",
+ caveRVA: 0xf3185,
+ payloadRVA: 0xf3190,
+ hooks: [
+ NtdllHook(rva: 0x48644, stolen: [0x1f, 0x20, 0x03, 0xd5]),
+ NtdllHook(rva: 0xa8734, stolen: [0x1f, 0x20, 0x03, 0xd5]),
+ ],
+ caveSize: 52859,
+ cavePad: 0xcc,
+ machine: 0xaa64,
+ magic: 0x20b,
+ imageBase: 0x1_8000_0000
+ ),
+ ],
- ]
+ ].merging(FreeEngineWinecx.releases.map { ($0.runner.id, $0.ntdllPatches) }) { pinned, _ in pinned }
static func patches(for build: RunnerBuild) -> [NtdllPatch] {
byBuild[build.id] ?? []
diff --cc app/Sources/NotProtonApp/Model/SupportedRunner.swift
index 15354d9,096ebef..6d40250
--- a/app/Sources/NotProtonApp/Model/SupportedRunner.swift
+++ b/app/Sources/NotProtonApp/Model/SupportedRunner.swift
@@@ -97,8 -93,8 +97,9 @@@ enum SupportedRunners
// First entry is what windows-only games get when Steam has no mapping.
static let toolPreference = [
legacyToolName, "notproton-fex", "notproton-fex-rosetta", "notproton-preview",
- "notproton-fex-41069", "notproton-fex-rosetta-41069", "notproton-preview-41069", "notproton-26.3", "notproton-winecx-11.17",
+ "notproton-fex-41069", "notproton-fex-rosetta-41069", "notproton-preview-41069",
- "notproton-fex-41073", "notproton-fex-rosetta-41073", "notproton-preview-41073", "notproton-26.3",
++ "notproton-fex-41073", "notproton-fex-rosetta-41073", "notproton-preview-41073", "notproton-26.3", "notproton-winecx-11.17",
+ "notproton-winecx", "notproton-winehq",
]
static let legacyToolName = "notproton"
@@@ -242,25 -238,44 +243,62 @@@
CompatTool(name: "notproton-fex-rosetta-41069", flavor: .rosetta, display: "CrossOver 2026 10 06-ARM64 - Rosetta"),
]
),
+ RunnerBuild(
+ bundleVersion: "winehq-11.15",
+ releaseVersion: "WineHQ 11.15",
+ flavor: nil,
+ loaderSHA256: "8aa25e55f28a0634a7df04c02dd719d4bc20de645cf42b9ba7d0e3b7d8f66a80",
+ cleanNtdll: [
+ .x86_64Windows: "682181234a55f5b7eed5b2ffa691fbdef1b488734337ef67ea7b5ce17adf43a2",
+ .i386Windows: "49396e7ad804a5345b1b968d02fdb6697ddbb7428e61e20e62806c50c37589d1",
+ ],
+ patchedNtdll: [
+ .x86_64Windows: "08a825e8236e79c909fae3934ca5e8a195a344d06f8affb6e13cdf1bd9ffa783",
+ .i386Windows: "88f9a1d16dd7127100eab902156390ec2a5ec67770cfddd3fd3f1237c9965309",
+ ],
+ tools: [
+ CompatTool(name: "notproton-winehq", flavor: .rosetta, display: "WineHQ 11.15 - Rosetta"),
+ ],
+ isFree: true
+ ),
+ RunnerBuild(
+ bundleVersion: "27.0.0.41073",
+ releaseVersion: "20261015",
+ flavor: nil,
+ loaderSHA256: "57144ccad16e75a171d48ea4b20974183e76c1cd5f5022bfc4b8917016b126b5",
+ cleanNtdll: [
+ .x86_64Windows: "f489347e59d4e8b43c2b0d2abbff9ee31e2059d45fd75fc04e2f4c0d8b04464a",
+ .i386Windows: "5249b95eea6df765257b2e5212831f511d8f66134abe3c231b8e73d8f5b4707e",
+ ],
+ patchedNtdll: [
+ .x86_64Windows: "901bff9138707d90efecc592bd9bd3062075a350add4b3a283b089c1da635a61",
+ .i386Windows: "7d3df0ee9dd61693293ba74a8d2c588b4dce26fb7f7a78c0c5ed5bdc58869e14",
+ ],
+ tools: [
+ CompatTool(name: "notproton-preview-41073", flavor: .rosetta, display: "CrossOver 2026 10 15-X86 - Rosetta"),
+ ]
+ ),
+ RunnerBuild(
+ bundleVersion: "27.0.0.41073",
+ releaseVersion: "20261015",
+ flavor: "fex",
+ loaderSHA256: "f4cedebfb30efc1e91e46ee25296abeb526fe7d814041d7cc6ca693bd4b8cb7b",
+ cleanNtdll: [
+ .x86_64Windows: "3d24426735defd222fd9518b094b738dc1c12afd13efc41a855013ed0f825129",
+ .i386Windows: "3ee764335e50709285361e2542731385f0b06e593a76aa84a3c328c278164c4f",
+ .aarch64Windows: "a6678f9d0818e1cdb325e1ce8a07a540433f544b6f756c52a6ab1cfd3f632408",
+ ],
+ patchedNtdll: [
+ .x86_64Windows: "2b47ed8c19d1d15d0f82519d39d64bf34113b285c4ada325bb64c5e587326d33",
+ .i386Windows: "3f4b0d9589c1f374e3c2fd135263f2bf3c8300e09dd010fd778936dd71e894ad",
+ .aarch64Windows: "2efb13f3303adc2c8ee61b93e027e4e94730a2e6b0162c7e6aebd4104200f07c",
+ ],
+ tools: [
+ CompatTool(name: "notproton-fex-41073", flavor: .fex, display: "CrossOver 2026 10 15-ARM64 - FEX"),
+ CompatTool(name: "notproton-fex-rosetta-41073", flavor: .rosetta, display: "CrossOver 2026 10 15-ARM64 - Rosetta"),
+ ]
+ ),
- ]
+ ] + FreeEngineWinecx.runnerBuilds
static func build(loaderSHA256 hash: String) -> RunnerBuild? {
all.lazy.compactMap { $0.matching(loaderSHA256: hash) }.first
diff --cc dylib/feats/compat_run.sh
index 2adc069,ce44478..8962e0d
--- a/dylib/feats/compat_run.sh
+++ b/dylib/feats/compat_run.sh
@@@ -1946,10 -1253,10 +1958,11 @@@ if [ -d "$bridge_src" ] && [ -n "$WINEP
exit 1
fi
install_legacy_steam_dll
+ install_runner_builtins
export WINEDLLPATH="$prefix_steam:$WINEDLLPATH"
# If the same DLL appears twice in WINEDLLOVERRIDES, the last entry wins.
- export WINEDLLOVERRIDES="${WINEDLLOVERRIDES:+$WINEDLLOVERRIDES;}steamclient=n;steamclient64=n;lsteamclient=b"
+ vc_overrides=$(native_vc_runtime)
+ export WINEDLLOVERRIDES="${vc_overrides}${WINEDLLOVERRIDES:+$WINEDLLOVERRIDES;}steamclient=n;steamclient64=n;lsteamclient=b"
native_client="$STEAM_COMPAT_CLIENT_INSTALL_PATH"
if [ -z "$native_client" ]; then
native_client="$HOME/Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS"
@@@ -2250,39 -1522,9 +2263,40 @@@ set --
lsregister="/System/Library/Frameworks/CoreServices.framework/Versions/A"
lsregister="$lsregister/Frameworks/LaunchServices.framework/Support/lsregister"
[ -x "$lsregister" ] && "$lsregister" -f "$loader_app" >> "$log" 2>&1 || true
-open -n -W -a "$loader_app" "$@" >> "$log" 2>&1 &
+if [ "${NOTPROTON_LAUNCH_SERVICES:-0}" = "1" ]; then
+ open -n -W -a "$loader_app" "$@" >> "$log" 2>&1 &
+else
+ # A bundle started by `open` is its own TCC responsible process, so every game
+ # needed a separate Input Monitoring grant before controllers worked. Started
+ # from here it stays attributed to Steam, which already holds that grant, and
+ # macOS still takes the Dock name and icon from the enclosing bundle. env -i
+ # with the same --env list keeps the environment `open` would have given it.
+ count=$#
+ i=0
+ mode=vars
+ while [ "$i" -lt "$count" ]; do
+ arg=$1
+ shift
+ i=$((i + 1))
+ case "$mode:$arg" in
+ vars:--env)
+ set -- "$@" "$1"
+ shift
+ i=$((i + 1))
+ ;;
+ vars:--args)
+ mode=args
+ set -- "$@" "$loader_app/Contents/MacOS/launcher"
+ ;;
+ args:*) set -- "$@" "$arg" ;;
+ esac
+ done
+ echo "launching bundle directly so input permission stays with Steam" >> "$log" 2>&1 || true
+ env -i HOME="$HOME" USER="$USER" LOGNAME="$LOGNAME" SHELL="$SHELL" TMPDIR="$TMPDIR" \
+ __CF_USER_TEXT_ENCODING="$__CF_USER_TEXT_ENCODING" "$@" >> "$log" 2>&1 &
+fi
open_pid=$!
+ /usr/bin/caffeinate -d -i -w "$open_pid" >> "$log" 2>&1 &
status=0
wait "$open_pid" || status=$?
echo "=== game exited status=$status, killing wine prefix ===" >> "$log" 2>&1 || true
diff --cc dylib/version.h
index b5c297d,42183e9..3c36657
--- a/dylib/version.h
+++ b/dylib/version.h
@@@ -2,6 -2,6 +2,6 @@@
#ifndef NOTPROTON_VERSION_H
#define NOTPROTON_VERSION_H
- #define NOTPROTON_VERSION "1.1.7-winehq.1-ray.27"
-#define NOTPROTON_VERSION "1.1.9"
++#define NOTPROTON_VERSION "1.1.9-winehq.1-ray.28"
#endif // NOTPROTON_VERSION_H
diff --cc ntdll-patch/apply.py
index 8709dea,fc7ce44..f0b99f9
--- a/ntdll-patch/apply.py
+++ b/ntdll-patch/apply.py
@@@ -23,10 -23,11 +23,15 @@@ PAYLOAD_BY_CLEAN_SHA =
"1b02dcf6ad9d9490870f1127a421c4c0d1471c65ec1574e1e84c05d69801ac7e": "detour2-fex-41069.bin",
"66b1a244a611795c59a93a9491d17f36c98cd8db9be495004a37864e0e5ed4a5": "detour32-fex-41069.bin",
"77ca83b2e1a3a1242f9d2d8868328262b2bcfc3f59bacf8b9389ea7e797ea852": "detour64-fex-41069.bin",
+ "5710d16382c7a822ed8b1cba58d95fd86fe01905f039c296ca7224abff8f98e8": "detour2-winecx-11.15.bin",
+ "e1b208073c804a443e64ada577899d96a5c8eaee435813e4a30e0d143bca6e3c": "detour32-winecx-11.15.bin",
+ "8b32c9f6f71b4f15fcaccb19b0f2adab9391ae73ad539cae9e136f8ee7d24128": "detour2-winecx-11.17.bin",
+ "cc8a9035cea0e26c5d333ef220f1becefc27ae44d2cdcdaea3278e8739d26fd9": "detour32-winecx-11.17.bin",
+ "f489347e59d4e8b43c2b0d2abbff9ee31e2059d45fd75fc04e2f4c0d8b04464a": "detour2-41073.bin",
+ "5249b95eea6df765257b2e5212831f511d8f66134abe3c231b8e73d8f5b4707e": "detour32-41073.bin",
+ "3d24426735defd222fd9518b094b738dc1c12afd13efc41a855013ed0f825129": "detour2-fex-41073.bin",
+ "3ee764335e50709285361e2542731385f0b06e593a76aa84a3c328c278164c4f": "detour32-fex-41073.bin",
+ "a6678f9d0818e1cdb325e1ce8a07a540433f544b6f756c52a6ab1cfd3f632408": "detour64-fex-41073.bin",
}
KNOWN_MACHINES = (0x8664, 0x14c, 0xaa64)
diff --cc ntdll-patch/resolve.py
index cb665e5,32db2f9..2a3088b
--- a/ntdll-patch/resolve.py
+++ b/ntdll-patch/resolve.py
@@@ -106,36 -106,46 +106,76 @@@ PINNED =
'exports': {'LdrGetDllHandle': 0x18004390c, 'LdrLoadDll': 0x180041344,
'NtProtectVirtualMemory': 0x180067050, 'NtOpenFile': 0x180066cb0,
'NtReadFile': 0x180066710, 'NtClose': 0x180066830}},
+ # WineCX 11.15 (dappermint winecx-gptk runtime 4.5.125)
+ '5710d16382c7a822ed8b1cba58d95fd86fe01905f039c296ca7224abff8f98e8':
+ {'hookRVA': 0x52e43, 'stolen': '4883bc24f000000000', 'caveRVA': 0x82b20, 'caveSize': 1248,
+ 'resume': 0x52e4c, 'wm': 'rbx', 'load_path': 0xd0,
+ 'payload': 'fde56854b9a7a32da19babe2427d19ff6a6b83de1917fe8d32aaddd2991fc6b9',
+ 'exports': {'LdrGetDllHandle': 0x170017910, 'LdrLoadDll': 0x170018480,
+ 'NtProtectVirtualMemory': 0x17000f640, 'NtOpenFile': 0x17000f2a0,
+ 'NtReadFile': 0x17000ed00, 'NtClose': 0x17000ee20}},
+ 'e1b208073c804a443e64ada577899d96a5c8eaee435813e4a30e0d143bca6e3c':
+ {'hookRVA': 0x4f7c0, 'stolen': 'f645b4027529', 'caveRVA': 0xb9000, 'caveSize': 4096,
+ 'resume': 0x4f7c6, 'wm': 'ebx', 'load_path': -0x5c,
+ 'payload': '37daf5f795535df91bc8fcbd356f22f4fd1ab379ec4acc97ddff44037d265556',
+ 'exports': {'LdrGetDllHandle': 0x7bc12a60, 'LdrLoadDll': 0x7bc13600,
+ 'NtProtectVirtualMemory': 0x7bc0d764, 'NtOpenFile': 0x7bc0d594,
+ 'NtReadFile': 0x7bc0d2c4, 'NtClose': 0x7bc0d354}},
+ # WineCX 11.17 (dappermint winecx-gptk runtime 4.7.3)
+ '8b32c9f6f71b4f15fcaccb19b0f2adab9391ae73ad539cae9e136f8ee7d24128':
+ {'hookRVA': 0x52de3, 'stolen': '4883bc24f000000000', 'caveRVA': 0x83360, 'caveSize': 3232,
+ 'resume': 0x52dec, 'wm': 'rbx', 'load_path': 0xd0,
+ 'payload': 'e1bbd185b19de3e23d627ae3a8bf25ed1b767bff5690102c5312a5ed3813e736',
+ 'exports': {'LdrGetDllHandle': 0x170017950, 'LdrLoadDll': 0x1700184c0,
+ 'NtProtectVirtualMemory': 0x17000f690, 'NtOpenFile': 0x17000f2f0,
+ 'NtReadFile': 0x17000ed50, 'NtClose': 0x17000ee70}},
+ 'cc8a9035cea0e26c5d333ef220f1becefc27ae44d2cdcdaea3278e8739d26fd9':
+ {'hookRVA': 0x4f880, 'stolen': 'f645b4027529', 'caveRVA': 0x808a0, 'caveSize': 1888,
+ 'resume': 0x4f886, 'wm': 'ebx', 'load_path': -0x5c,
+ 'payload': '0676104e0bd56c4a1e8c473d9cbcd21fb2ba105fc7dc6cf5a70d37692c129e28',
+ 'exports': {'LdrGetDllHandle': 0x7bc12aa0, 'LdrLoadDll': 0x7bc13640,
+ 'NtProtectVirtualMemory': 0x7bc0d7a4, 'NtOpenFile': 0x7bc0d5d4,
+ 'NtReadFile': 0x7bc0d304, 'NtClose': 0x7bc0d394}},
+ 'f489347e59d4e8b43c2b0d2abbff9ee31e2059d45fd75fc04e2f4c0d8b04464a':
+ {'hookRVA': 0x51f15, 'stolen': '4883bc24f000000000', 'caveRVA': 0x814a0, 'caveSize': 2912,
+ 'resume': 0x51f1e, 'wm': 'rsi', 'load_path': 0xd0,
+ 'payload': '971c9c8c0f5a9fc7338fb5012a88f8a5297924e48cadb0aa0fa827cce0984a6e',
+ 'exports': {'LdrGetDllHandle': 0x170017710, 'LdrLoadDll': 0x170018230,
+ 'NtProtectVirtualMemory': 0x17000f690, 'NtOpenFile': 0x17000f2f0,
+ 'NtReadFile': 0x17000ed50, 'NtClose': 0x17000ee70}},
+ '5249b95eea6df765257b2e5212831f511d8f66134abe3c231b8e73d8f5b4707e':
+ {'hookRVA': 0x4d6c8, 'stolen': 'f645bc027526', 'caveRVA': 0x7d070, 'caveSize': 3984,
+ 'resume': 0x4d6ce, 'wm': 'edi', 'load_path': -0x54,
+ 'payload': '693d6b8ac801c5697dc7d86aeb4f23fbfb1fd08bb3f949ad3e4b2311cd28348a',
+ 'exports': {'LdrGetDllHandle': 0x7bc125f0, 'LdrLoadDll': 0x7bc130e0,
+ 'NtProtectVirtualMemory': 0x7bc0d7a4, 'NtOpenFile': 0x7bc0d5d4,
+ 'NtReadFile': 0x7bc0d304, 'NtClose': 0x7bc0d394}},
+ '3d24426735defd222fd9518b094b738dc1c12afd13efc41a855013ed0f825129':
+ {'hookRVA': 0x3499e, 'stolen': '488b842410010000', 'caveRVA': 0x79ba4, 'caveSize': 1116,
+ 'resume': 0x349a6, 'wm': 'rbx', 'load_path': 0x98,
+ 'payload': 'd3b922ad4eae11d9a95cdab1276546af08bd3b28e041427ea0ebc557b094ad32',
+ 'exports': {'LdrGetDllHandle': 0x17002f3d0, 'LdrLoadDll': 0x17002ce20,
+ 'NtProtectVirtualMemory': 0x170055cac, 'NtOpenFile': 0x17005590c,
+ 'NtReadFile': 0x17005536c, 'NtClose': 0x17005548c}},
+ '3ee764335e50709285361e2542731385f0b06e593a76aa84a3c328c278164c4f':
+ {'hookRVA': 0x2ecf2, 'stolen': '8b4514a802', 'caveRVA': 0xa4000, 'caveSize': 4096,
+ 'resume': 0x2ecf7, 'wm': 'esi', 'load_path': -0x3c,
+ 'payload': 'e0b3a73bb287ecdebe7a9516a732b60e8de95fa0a756ae5ea4c5bd46e4a807c2',
+ 'exports': {'LdrGetDllHandle': 0x7bc2a580, 'LdrLoadDll': 0x7bc28660,
+ 'NtProtectVirtualMemory': 0x7bc4d710, 'NtOpenFile': 0x7bc4d540,
+ 'NtReadFile': 0x7bc4d270, 'NtClose': 0x7bc4d300}},
+ 'a6678f9d0818e1cdb325e1ce8a07a540433f544b6f756c52a6ab1cfd3f632408':
+ {'caveRVA': 0xf3185, 'caveSize': 52859,
+ 'sites': [{'hookRVA': 0x48644, 'stolen': '1f2003d5', 'resume': 0x48648,
+ 'wm': 'x27', 'load_path': -0x98},
+ {'hookRVA': 0xa8734, 'stolen': '1f2003d5', 'resume': 0xa8738,
+ 'wm': 'x22', 'load_path': -0x88}],
+ 'guest': {'LdrLoadDll': 0xa0aa0, 'LdrGetDllHandle': 0xa0aa0,
+ 'NtProtectVirtualMemory': 0xece9c},
+ 'payload': '8a6fe80587815393059cb2cecfdc542b666c158e147560875ff19f37221726d2',
+ 'exports': {'LdrGetDllHandle': 0x180043818, 'LdrLoadDll': 0x180041344,
+ 'NtProtectVirtualMemory': 0x180066f60, 'NtOpenFile': 0x180066bc0,
+ 'NtReadFile': 0x180066620, 'NtClose': 0x180066740}},
}
EXPORTS = ['LdrGetDllHandle', 'LdrLoadDll', 'NtProtectVirtualMemory',
'NtOpenFile', 'NtReadFile', 'NtClose']
diff --cc steam-shim/steam.cpp
index 4632d2b,ab5c870..07f9096
--- a/steam-shim/steam.cpp
+++ b/steam-shim/steam.cpp
@@@ -1475,18 -1475,10 +1475,22 @@@ run
si.wShowWindow = SW_HIDE;
}
- si.dwFlags |= STARTF_USESTDHANDLES;
- si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+ /* STARTF_USESTDHANDLES would pin console games to the log, and console calls like Console.Clear() would fail. */
+ BOOL inherit = !(flags & CREATE_NEW_CONSOLE);
+
+ /* Steam on Windows starts games without a stdout. Source 2 takes any stdout as
+ * a console build (tier0 Plat_IsConsoleApplication: GetFileType(stdout) != 0)
+ * and then skips NGX, so Deadlock never offers DLSS. The STDOUT_NULL gamefix
+ * starts the game the Windows way. */
+ if (GetEnvironmentVariableW(L"NOTPROTON_STDOUT_NULL", NULL, 0))
++ {
++ si.dwFlags |= STARTF_USESTDHANDLES;
++ si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+ si.hStdOutput = NULL;
++ si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
++ }
+
- if (!CreateProcessW(NULL, cmdline, NULL, NULL, TRUE, flags, NULL, NULL, &si, &pi))
+ if (!CreateProcessW(NULL, cmdline, NULL, NULL, inherit, flags, NULL, NULL, &si, &pi))
{
WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError());
return INVALID_HANDLE_VALUE;