Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
feat(webpatch): show the game Properties Compatibility tab as Bridgeplay, with its mark
raymondchinsa74d4d9d5c6d
diff --git a/README.md b/README.mdindex 7250da8..33d3696 100644--- a/README.md+++ b/README.md@@ -71,6 +71,8 @@ To add yours: after you play, Bridgeplay asks once per game *How did it run?* On3. **Follow the Setup Assistant**: Rosetta, graphics, Steam sign-in and a couple of standard macOS prompts.4. **Press Play** on any Windows game in Steam. The first time you use a controller, allow Steam's Input Monitoring request.+Each game's Bridgeplay settings (graphics backend, Metal HUD, DLSS, frame generation, controllers) are in Steam: right-click the game, **Properties… › Bridgeplay**.+Updates install themselves: Bridgeplay, its patch in Steam and the engine. **Refresh** on the Status page checks on demand.The installer includes Apple's Game Porting Toolkit redistributables under Apple's license, which allows non-commercial distribution only. Bridgeplay is free and non-commercial.diff --git a/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings b/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstringsindex 96b7f53..2457da5 100644--- a/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings+++ b/app/Sources/BridgeplayApp/Resources/Localization/Localizable.xcstrings@@ -972,18 +972,18 @@}}},- "A game's own Steam Properties › Compatibility settings win over these." : {+ "A game's own settings in Steam Properties › Bridgeplay win over these." : {"localizations" : {"it" : {"stringUnit" : {"state" : "translated",- "value" : "Le impostazioni di un gioco in Proprietà di Steam › Compatibilità hanno la precedenza su queste."+ "value" : "Le impostazioni di un gioco in Proprietà di Steam › Bridgeplay hanno la precedenza su queste."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "单个游戏在 Steam 属性 › 兼容性中的设置优先于这里。"+ "value" : "单个游戏在 Steam 属性 › Bridgeplay 中的设置优先于这里。"}}}@@ -1980,18 +1980,18 @@}}},- "Both start off. You can change them here later, or for one game in its Steam Properties › Compatibility." : {+ "Both start off. You can change them here later, or for one game in its Steam Properties › Bridgeplay." : {"localizations" : {"it" : {"stringUnit" : {"state" : "translated",- "value" : "Entrambe partono disattivate. Puoi cambiarle qui più tardi, o per un singolo gioco in Proprietà di Steam › Compatibilità."+ "value" : "Entrambe partono disattivate. Puoi cambiarle qui più tardi, o per un singolo gioco in Proprietà di Steam › Bridgeplay."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "两项默认关闭。之后可以在这里更改,也可以在单个游戏的 Steam 属性 › 兼容性中更改。"+ "value" : "两项默认关闭。之后可以在这里更改,也可以在单个游戏的 Steam 属性 › Bridgeplay 中更改。"}}}@@ -2655,18 +2655,18 @@}}},- "Choose Compatibility. Bridgeplay's settings follow Steam Play on that page." : {+ "Choose Bridgeplay. Steam Play's engine picker is at the top, Bridgeplay's settings below it." : {"localizations" : {"it" : {"stringUnit" : {"state" : "translated",- "value" : "Scegli Compatibilità. Le impostazioni di Bridgeplay seguono Steam Play in quella pagina."+ "value" : "Scegli Bridgeplay. In alto c'è il selettore del motore di Steam Play, sotto ci sono le impostazioni di Bridgeplay."}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "选择“兼容性”。Bridgeplay 的设置就在该页面 Steam Play 下方。"+ "value" : "选择“Bridgeplay”。顶部是 Steam Play 的引擎选择,下方是 Bridgeplay 的设置。"}}}@@ -2783,22 +2783,6 @@}}},- "Compatibility" : {- "localizations" : {- "it" : {- "stringUnit" : {- "state" : "translated",- "value" : "Compatibilità"- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "兼容性"- }- }- }- },"Compatibility Tool" : {"localizations" : {"it" : {@@ -4018,18 +4002,18 @@}}},- "Every setting on the Compatibility page" : {+ "Every setting on the Bridgeplay tab" : {"localizations" : {"it" : {"stringUnit" : {"state" : "translated",- "value" : "Tutte le impostazioni della pagina Compatibilità"+ "value" : "Tutte le impostazioni della scheda Bridgeplay"}},"zh-Hans" : {"stringUnit" : {"state" : "translated",- "value" : "兼容性页面上的所有设置"+ "value" : "Bridgeplay 标签页上的所有设置"}}}diff --git a/app/Sources/BridgeplayApp/Views/GuideView.swift b/app/Sources/BridgeplayApp/Views/GuideView.swiftindex 102a0e3..698af7a 100644--- a/app/Sources/BridgeplayApp/Views/GuideView.swift+++ b/app/Sources/BridgeplayApp/Views/GuideView.swift@@ -4,7 +4,8 @@ import SwiftUI// pictures are drawings of Steam's own screens in Steam's colours (like the ones on// bridgeplay.dev), not screenshots: the game list is the player's own, read from Steam's// library cache, so no game art ships with Bridgeplay. The option names and order follow the-// panel the dylib adds to Steam's Compatibility page (dylib/feats/webpatch.c); keep them in step.+// Bridgeplay tab the dylib adds to a game's Steam Properties (dylib/feats/webpatch.c); keep them+// in step.struct GuideView: View {@State private var entries: [LibraryEntry] = LibraryEntry.samples@@ -54,18 +55,18 @@ struct GuideView: View {GuideStep(number: 1, text: String(localized: "In your Steam library, right-click the game and choose Properties…")) {SteamLibraryDrawing(entries: entries)}- GuideStep(number: 2, text: String(localized: "Choose Compatibility. Bridgeplay's settings follow Steam Play on that page.")) {+ GuideStep(number: 2, text: String(localized: "Choose Bridgeplay. Steam Play's engine picker is at the top, Bridgeplay's settings below it.")) {SteamPropertiesDrawing(game: game)}}}- // MARK: The Compatibility page, block by block+ // MARK: The Bridgeplay tab, block by blockprivate var compatibilityPage: some View {VStack(alignment: .leading, spacing: 18) {VStack(alignment: .leading, spacing: 6) {- Text("Every setting on the Compatibility page")+ Text("Every setting on the Bridgeplay tab").font(BP.sans(20, .semibold)).tracking(-0.5)Text("Drawn the way Steam shows them. Changes apply the next time the game starts. Not sure? Leave a setting as it is: Bridgeplay picks what works for each game.")@@ -287,11 +288,11 @@ private struct SteamLibraryDrawing: View {}}-// The Properties window on Compatibility, as Steam draws it.+// The Properties window on the Bridgeplay tab, as Steam draws it.private struct SteamPropertiesDrawing: View {let game: String- private let tabs: [LocalizedStringKey] = ["General", "Compatibility", "Updates", "Installed Files",+ private let tabs: [LocalizedStringKey] = ["General", "Bridgeplay", "Updates", "Installed Files","Game Versions & Betas", "Controller", "Game Recording","Privacy", "Customization"]@@ -310,15 +311,18 @@ private struct SteamPropertiesDrawing: View {.lineLimit(1).padding(.bottom, 8)ForEach(Array(tabs.enumerated()), id: \.offset) { index, tab in- Text(tab)- .font(Steam.font(10.5, .regular))- .foregroundStyle(index == 1 ? Color.white : Steam.dim)- .lineLimit(1)- .fixedSize()- .padding(.horizontal, 10)- .frame(maxWidth: .infinity, minHeight: 21, alignment: .leading)- .background(index == 1 ? Steam.sidebarSelected : .clear)- .padding(.horizontal, -10)+ HStack(spacing: 4) {+ if index == 1 { BridgeplayMark(size: 10) }+ Text(tab)+ }+ .font(Steam.font(10.5, .regular))+ .foregroundStyle(index == 1 ? Color.white : Steam.dim)+ .lineLimit(1)+ .fixedSize()+ .padding(.horizontal, 10)+ .frame(maxWidth: .infinity, minHeight: 21, alignment: .leading)+ .background(index == 1 ? Steam.sidebarSelected : .clear)+ .padding(.horizontal, -10)}Spacer(minLength: 0)}@@ -328,7 +332,7 @@ private struct SteamPropertiesDrawing: View {.background(Steam.sidebar)VStack(alignment: .leading, spacing: 7) {- Text("Compatibility").font(Steam.font(15, .bold)).foregroundStyle(.white)+ Text(verbatim: "Bridgeplay").font(Steam.font(15, .bold)).foregroundStyle(.white)Text(verbatim: "Steam Play").font(Steam.font(11, .semibold)).foregroundStyle(.white).padding(.top, 2)HStack {Text("Select compatibility tool").font(Steam.font(9.5, .regular)).foregroundStyle(Steam.text)@@ -372,7 +376,7 @@ private struct SteamPropertiesDrawing: View {}}-// One block of the Compatibility page at Steam's size, each control followed by what it does.+// One block of the Bridgeplay tab at Steam's size, each control followed by what it does.private struct SteamBlock<Rows: View>: View {let title: String@ViewBuilder let rows: Rowsdiff --git a/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift b/app/Sources/BridgeplayApp/Views/SetupAssistantView.swiftindex e53d5b8..0663095 100644--- a/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift+++ b/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift@@ -359,7 +359,7 @@ struct SetupAssistantView: View {toggle: Binding(get: { model.highResolution }, set: { model.setGameDefault(.highResolution, $0) })),symbol: "display")}- Text("Both start off. You can change them here later, or for one game in its Steam Properties › Compatibility.")+ Text("Both start off. You can change them here later, or for one game in its Steam Properties › Bridgeplay.").font(BP.sans(12)).foregroundStyle(BP.fg3).fixedSize(horizontal: false, vertical: true)diff --git a/app/Sources/BridgeplayApp/Views/StatusView.swift b/app/Sources/BridgeplayApp/Views/StatusView.swiftindex 885860f..1fd86e1 100644--- a/app/Sources/BridgeplayApp/Views/StatusView.swift+++ b/app/Sources/BridgeplayApp/Views/StatusView.swift@@ -456,7 +456,7 @@ struct StatusView: View {} header: {Text("For Every Game")} footer: {- Text("A game's own Steam Properties › Compatibility settings win over these.")+ Text("A game's own settings in Steam Properties › Bridgeplay win over these.")}}diff --git a/docs/GAMEFIXES.md b/docs/GAMEFIXES.mdindex 6cdc14c..5e0fe2e 100644--- a/docs/GAMEFIXES.md+++ b/docs/GAMEFIXES.md@@ -56,7 +56,7 @@ Wine uses the last entry for a DLL in `WINEDLLOVERRIDES`. The order is: backend,The backend is picked in this order:1. `BRIDGEPLAY_BACKEND=<name>` (or `NOTPROTON_BACKEND`) in the launch options-2. `CX_GRAPHICS_BACKEND` in the launch options, which the Steam panel's Graphics menu sets.+2. `CX_GRAPHICS_BACKEND` in the launch options, which the Graphics menu in the game's Steam Properties › Bridgeplay sets.Any case is accepted. `d3dmetal`, `dxmt` and `dxvk` map to themselves, and `wined3d`,`opengl` and `wine` map to `wined3d`. Other values are logged and ignored3. `BACKEND=` in a conf file@@ -76,7 +76,7 @@ forwarders are that engine's `dxgi`, `d3d10`, `d3d11` and `d3d12` builtins and Ware set aside. So on that engine:- the default, and auto-detection for D3D11 and D3D12 games alike, is `d3dmetal`-- `wined3d`, from any source (launch options, the Steam panel, a conf, the last launch), is+- `wined3d`, from any source (launch options, the Bridgeplay tab in Steam, a conf, the last launch), islogged as not available and runs `d3dmetal`- a missing `dxmt` falls back to `d3dmetal`, and so does a `dxmt` or `dxvk` that cannot bestaged into the prefix@@ -150,7 +150,7 @@ with variable names as they are (`BRIDGEPLAY_FRAMEGEN=2`, `NP_PAD_MODE=hid`, `MT1. `~/Library/Application Support/bridgeplay/gamefixes/native-default.conf`, for every native game2. `~/Library/Application Support/bridgeplay/gamefixes/native/<appid>.conf`, which wins per key-The Steam panel for such a game shows the Metal HUD, Frame Generation and the controller+The Bridgeplay tab in Steam Properties for such a game shows the Metal HUD, Frame Generation and the controllerlayer (`NP_PAD_MODE`: `hid`, `gc` or `off`). It writes the launch options as`<home>/.bridgeplay/np-native VAR=VALUE ... %command% <game args>`, and rewrites the older`/usr/bin/arch -arm64 -x86_64 -e VAR=VALUE ... %command%` form into that one, dropping itsdiff --git a/docs/dualsense-bluetooth.md b/docs/dualsense-bluetooth.mdindex 2534037..8acc646 100644--- a/docs/dualsense-bluetooth.md+++ b/docs/dualsense-bluetooth.md@@ -36,8 +36,8 @@ conversion.| No supported controller, or more than one | Keep the original path. || `DSB_DISABLED=1 %command%` | Bypass the bridge for this launch. |-Use Steam's per-game Compatibility setting **Let games read controllers-directly** for games with their own DualSense support. The bridge forwards+Use the setting **Let games read controllers directly** in the game's+Steam Properties › Bridgeplay for games with their own DualSense support. The bridge forwardsinput (including sensor data), supported output reports for triggers andlights, traditional rumble, and haptic PCM supplied by the game. Triggereffects and gyro-to-aim mappings depend on the game's implementation.diff --git a/dylib/feats/compat_run.sh b/dylib/feats/compat_run.shindex e7b542a..82cab58 100755--- a/dylib/feats/compat_run.sh+++ b/dylib/feats/compat_run.sh@@ -1092,7 +1092,7 @@ refuse_other_build() {if [ -n "$had_build" ] && [ "$had_build" != "$np_build" ]; thenecho "=== prefix was last run by build $had_build and this compatibility tool runs $np_build, rebuild the prefix in Bridgeplay ===" >> "$log" 2>&1 || truehad_display=$(alert_safe "${had_display:-CrossOver build $had_build}")- show_alert "This game needs its prefix rebuilt" "This game's prefix was last run by $had_display, and this compatibility tool runs $(alert_safe "$np_display"). Rebuild the prefix in Bridgeplay to run it here, or pick $had_display again in the game's Compatibility settings. You will not lose game saves by rebuilding the prefix."+ show_alert "This game needs its prefix rebuilt" "This game's prefix was last run by $had_display, and this compatibility tool runs $(alert_safe "$np_display"). Rebuild the prefix in Bridgeplay to run it here, or pick $had_display again in the game's Steam Properties > Bridgeplay. You will not lose game saves by rebuilding the prefix."exit 1fi}diff --git a/dylib/feats/webpatch.c b/dylib/feats/webpatch.cindex 00f9151..e5e3605 100644--- a/dylib/feats/webpatch.c+++ b/dylib/feats/webpatch.c@@ -1,4 +1,5 @@-// Enables Steam Play in the UI/enables the Compatibility tab in game properties+// Enables Steam Play in the UI, and shows the game properties tab Steam calls Compatibility+// as Bridgeplay, since on a Mac every setting on it is Bridgeplay's#include "webpatch.h"#include "nativeplatform.h"#include "../util/log.h"@@ -271,9 +272,9 @@ static int out_expand(np_out_t *o, const char *replace, const np_cap_t *caps) {"(" NP_WEB_IS_ZH "?\"" ZH "\":" NP_WEB_IS_IT "?\"" IT "\":\"" EN "\")"#define NP_COMPAT_HINT NP_WEB_TEXT( \- "Enable CrossOver under Properties > Compatibility to install and run the Windows version.", \- "请在“属性 > 兼容性”中启用 CrossOver,以安装并运行 Windows 版本。", \- "Abilita CrossOver in Propriet\\u00e0 > Compatibilit\\u00e0 per installare e avviare la versione Windows.")+ "Enable CrossOver under Properties > Bridgeplay to install and run the Windows version.", \+ "请在“属性 > Bridgeplay”中启用 CrossOver,以安装并运行 Windows 版本。", \+ "Abilita CrossOver in Propriet\\u00e0 > Bridgeplay per installare e avviare la versione Windows.")#define NP_IMAGE_FILES_LABEL NP_WEB_TEXT( \"Image Files (*.tga,*.png,*.exe)", "图像文件 (*.tga,*.png,*.exe)", "File immagine (*.tga,*.png,*.exe)")@@ -471,13 +472,33 @@ static int out_expand(np_out_t *o, const char *replace, const np_cap_t *caps) {"localStorage.setItem(K,\"1\")" \"}catch(e){console.error(\"Bridgeplay: launch options migration failed\",e)}})()"+// The properties tab Steam calls Compatibility. Its route stays /compatibility.+#define NP_TAB_FIND \+ "(0," NP_C1 ".CI)()&&" NP_C2 ".push({title:(0," NP_C3 ".we)(\"#AppProperties_CompatibilityPage\")"+#define NP_TAB_REPLACE "true&&" NP_C2 ".push({title:\"Bridgeplay\""++// The Bridgeplay mark next to the tab name. Optional: if Steam moves it, the tab stays.+#define NP_TAB_ICON_SVG \+ "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'>" \+ "<rect width='24' height='24' rx='6' fill='#000'/>" \+ "<g transform='translate(2.4 2.4) scale(.8)' fill='none' stroke='#f5f5f7' stroke-linecap='round' stroke-linejoin='round'>" \+ "<path d='M2 14h20M6.5 4v10M17.5 4v10' stroke-width='1.8'/>" \+ "<path d='M2 7c2.5 0 3.5-3 4.5-3S9.5 11 12 11s4.5-7 5.5-7 2 3 4.5 3' stroke-width='1.4'/>" \+ "<path d='M6.5 16.5v3M17.5 16.5v3M2 21c2.5 0 3.5-1.6 4.5-1.6S9.5 17.3 12 17.3s4.5 2.1 5.5 2.1 2 1.6 4.5 1.6' stroke-width='1.2' opacity='.35'/>" \+ "</g></svg>"+#define NP_TAB_ICON_GATE \+ { ",link:" NP_C1 "." NP_C2 ".AppProperties.Compatibility(" NP_C3 "),content:(0," NP_C4 ".jsx)(", \+ ",link:" NP_C1 "." NP_C2 ".AppProperties.Compatibility(" NP_C3 "),icon:(0," NP_C4 ".jsx)(\"span\"," \+ "{style:{display:\"flex\"},dangerouslySetInnerHTML:{__html:\"" NP_TAB_ICON_SVG "\"}})," \+ "content:(0," NP_C4 ".jsx)(", 2, 1 }+static const np_gate_t g_gates_forcetool[] = {// SteamPlay settings section{ "function " NP_C1 "(" NP_C2 "){return(0," NP_C3 ".CI)()?","function " NP_C1 "(" NP_C2 "){return true?", 1, 0 },- // AppProperties Compatibility tab (app and non-Steam-shortcut variants)- { "(0," NP_C1 ".CI)()&&" NP_C2 ".push({title:(0," NP_C3 ".we)(\"#AppProperties_CompatibilityPage\")",- "true&&" NP_C2 ".push({title:(0," NP_C3 ".we)(\"#AppProperties_CompatibilityPage\")", 2, 0 },+ // AppProperties Compatibility tab, shown as Bridgeplay (app and non-Steam-shortcut variants)+ { NP_TAB_FIND, NP_TAB_REPLACE, 2, 0 },+ NP_TAB_ICON_GATE,// Settings page Compatibility entry, keeping the SteamOS exclusion (!rf()){ "Compatibility:{visible:" NP_C1 "&&(0," NP_C2 ".CI)()&&!(0," NP_C2 ".rf)()","Compatibility:{visible:" NP_C1 "&&true&&!(0," NP_C2 ".rf)()", 1, 0 },@@ -516,11 +537,9 @@ static const np_gate_t g_gates_forcetool[] = {// Support for new compatibility tab UI in the Steam betastatic const np_gate_t g_gates_selecttool[] = {- // AppProperties Compatibility tab- { "(0," NP_C1 ".CI)()&&" NP_C2 ".push({title:(0," NP_C3 ".we)"- "(\"#AppProperties_CompatibilityPage\")",- "true&&" NP_C2 ".push({title:(0," NP_C3 ".we)"- "(\"#AppProperties_CompatibilityPage\")", 2, 0 },+ // AppProperties Compatibility tab, shown as Bridgeplay+ { NP_TAB_FIND, NP_TAB_REPLACE, 2, 0 },+ NP_TAB_ICON_GATE,// Settings page Compatibility entry.{ "Compatibility:{visible:" NP_C1 "&&(0," NP_C2 ".CI)(),title:","Compatibility:{visible:" NP_C1 "&&true,title:", 1, 0 },diff --git a/dylib/feats/webpatch.h b/dylib/feats/webpatch.hindex 28c6793..22c3bae 100644--- a/dylib/feats/webpatch.h+++ b/dylib/feats/webpatch.h@@ -1,4 +1,4 @@-// Enables Steam Play in the UI/enables the Compatibility tab in game properties+// Enables Steam Play in the UI, and shows the game properties Compatibility tab as Bridgeplay#ifndef NOTPROTON_FEATS_WEBPATCH_H#define NOTPROTON_FEATS_WEBPATCH_Hdiff --git a/dylib/tests/panel-behavior/localization.js b/dylib/tests/panel-behavior/localization.jsindex b21aec6..fb043ae 100644--- a/dylib/tests/panel-behavior/localization.js+++ b/dylib/tests/panel-behavior/localization.js@@ -39,9 +39,9 @@ for (const form of Object.keys(FORMS)) {hud.props.onChange(true);assert.equal(written.at(-1).opts, 'MTL_HUD_ENABLED=1 CX_GRAPHICS_BACKEND=dxmt %command%');for (const [mode, ...labels] of [- ['compat-hint', 'Enable CrossOver under Properties > Compatibility to install and run the Windows version.',- '请在“属性 > 兼容性”中启用 CrossOver,以安装并运行 Windows 版本。',- 'Abilita CrossOver in Proprietà > Compatibilità per installare e avviare la versione Windows.'],+ ['compat-hint', 'Enable CrossOver under Properties > Bridgeplay to install and run the Windows version.',+ '请在“属性 > Bridgeplay”中启用 CrossOver,以安装并运行 Windows 版本。',+ 'Abilita CrossOver in Proprietà > Bridgeplay per installare e avviare la versione Windows.'],['image-files-label', 'Image Files (*.tga,*.png,*.exe)', '图像文件 (*.tga,*.png,*.exe)','File immagine (*.tga,*.png,*.exe)'],['library-windows-hint', 'Show only games that run on Windows and do not have a macOS version',