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
Clear settings FEX can't use, updated for the new Steam Compatibility UI
NotProtonNot5568282bdcb8
diff --git a/dylib/feats/webpatch.c b/dylib/feats/webpatch.cindex d46bd18..1581ce9 100644--- a/dylib/feats/webpatch.c+++ b/dylib/feats/webpatch.c@@ -34,8 +34,11 @@ typedef struct {const char *find;const char *replace;int expect; // exact occurrence count, else abort+ int optional; // skipped in the event that it doesn't match the current Steam client} np_gate_t;+#define NP_GATE_MAX 32+typedef struct { const char *at; size_t len; } np_cap_t;static int is_ident_char(unsigned char c) {@@ -225,6 +228,11 @@ static int out_expand(np_out_t *o, const char *replace, const np_cap_t *caps) {"||k===\"CX_GRAPHICS_BACKEND\"&&L.g(k)===\"d3dmetal\");" \"ks.length&&L.s(ks.map(k=>[k,\"\"]))}"+#define NP_CX_TOOL_QUERY \+ "(r,id)=>[r[0],v=>{r[1](v);const d=r[0].data;if(!id||!d)return;" \+ "const n=v||d.default_tool_identifier||\"" NP_FALLBACK_TOOL "\",a=(d.aliases||[]).find(x=>x.alias===n)," \+ "t=globalThis.appDetailsStore?.GetAppDetails(id);t&&MSCXPick(t,a?a.current_tool_name:n)}]"+// CrossOver options panel. Not in great shape, but it'll do#define NP_WEB_IS_ZH \"(()=>{const l=(globalThis.document?.documentElement?.lang||" \@@ -317,6 +325,8 @@ static int out_expand(np_out_t *o, const char *replace, const np_cap_t *caps) {// Valve is testing a new compatibility page UI, this logic relates to supporting that#define NP_CX_OPTIONS_STATEMENT \"var MSCXLaunch=" NP_CX_LAUNCH ";" \+ "var MSCXPick=" NP_CX_PICK ";" \+ "var MSCXToolQuery=" NP_CX_TOOL_QUERY ";" \"var MSCXOpts=" NP_CX_OPTIONS_CAPTURE(NP_C3, NP_C4) ";"// 1.0.x saved CrossOver settings without %command%, this migrates them.@@ -351,13 +361,13 @@ static int out_expand(np_out_t *o, const char *replace, const np_cap_t *caps) {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 },+ "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 },+ "true&&" NP_C2 ".push({title:(0," NP_C3 ".we)(\"#AppProperties_CompatibilityPage\")", 2, 0 },// 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 },+ "Compatibility:{visible:" NP_C1 "&&true&&!(0," NP_C2 ".rf)()", 1, 0 },{ "return(0," NP_C1 ".jsxs)(" NP_C1 ".Fragment,{children:[0!=" NP_C2 ".length&&(0," NP_C1 ".jsx)(" NP_C3 ",{label:(0," NP_C4 ".we)""(\"#AppProperties_CompatilibityForceTool\"),checked:" NP_C5 ",onChange:" NP_C6 ",disabled:!" NP_C7 "||0===" NP_C2 ".length}),"NP_C5 "&&" NP_C2 ".length>0&&(0," NP_C1 ".jsx)(" NP_C8 ".m,{strClassName:" NP_C9 "().TopGap,rgOptions:" NP_C10 ","@@ -367,7 +377,7 @@ static const np_gate_t g_gates_forcetool[] = {"(\"#AppProperties_CompatilibityForceTool\"),checked:" NP_C5 ",onChange:" NP_C6 ",disabled:!" NP_C7 "||0===" NP_C2 ".length}),"NP_C5 "&&" NP_C2 ".length>0&&(0," NP_C1 ".jsx)(" NP_C8 ".m,{strClassName:" NP_C9 "().TopGap+\" MSCXNoBottomGap\",rgOptions:" NP_C10 ",""selectedOption:" NP_C11 ".strCompatToolName,onChange:" NP_C12 "=>{SteamClient.Apps.SpecifyCompatTool"- "(" NP_C11 ".unAppID," NP_C12 ".data);MSCXPick(" NP_C11 "," NP_C12 ".data)}})]})", 1 },+ "(" NP_C11 ".unAppID," NP_C12 ".data);MSCXPick(" NP_C11 "," NP_C12 ".data)}})]})", 1, 0 },// Compatibility page container{ NP_C1 "=(0," NP_C2 ".PA)(" NP_C3 "=>(0," NP_C4 ".jsxs)(" NP_C5".nB,{children:[(0," NP_C4 ".jsx)(\"div\",{className:" NP_C6@@ -379,16 +389,16 @@ static const np_gate_t g_gates_forcetool[] = {".nB,{children:[(0," NP_C4 ".jsx)(\"div\",{className:" NP_C6"().HiddenIfNotLast,children:(0," NP_C7 ".we)(\"#AppProperties_CompatibilityNoOptions\")}),""(0," NP_C4 ".jsx)(" NP_C8 ",{..." NP_C3 "}),(0," NP_C4 ".jsx)(" NP_C9- ",{..." NP_C3 "}),(0," NP_C4 ".jsx)(MSCXOpts,{..." NP_C3 "})]}));", 1 },+ ",{..." NP_C3 "}),(0," NP_C4 ".jsx)(MSCXOpts,{..." NP_C3 "})]}));", 1, 0 },{ "get is_invalid_os_type(){return this.most_available_per_client_data.is_invalid_os_type}",- "get is_invalid_os_type(){return false}", 1 },+ "get is_invalid_os_type(){return false}", 1, 0 },// Reminder banner for 32 bit Mac games{ NP_C1 ".is_invalid_os_type&&(0," NP_C2 ".jsx)(" NP_C3 ",{})","!" NP_C1 ".local_per_client_data?.installed&&"NP_C1 ".most_available_per_client_data?.is_invalid_os_type&&"- "(0," NP_C2 ".jsx)(" NP_C3 ",{})", 1 },+ "(0," NP_C2 ".jsx)(" NP_C3 ",{})", 1, 0 },{ "(0," NP_C1 ".we)(\"#GameList_Entry_Invalid_OSType2\")",- NP_COMPAT_HINT, 1 },+ NP_COMPAT_HINT, 1, 0 },};// Support for new compatibility tab UI in the Steam beta@@ -397,10 +407,10 @@ static const np_gate_t g_gates_selecttool[] = {{ "(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 },+ "(\"#AppProperties_CompatibilityPage\")", 2, 0 },// Settings page Compatibility entry.{ "Compatibility:{visible:" NP_C1 "&&(0," NP_C2 ".CI)(),title:",- "Compatibility:{visible:" NP_C1 "&&true,title:", 1 },+ "Compatibility:{visible:" NP_C1 "&&true,title:", 1, 0 },{ "function " NP_C1 "(" NP_C2 "){return(0," NP_C3 ".jsxs)(" NP_C4 ".XY,{label:(0," NP_C5 ".we)""(\"#Settings_SteamPlay_SteamPlay\"),children:[(0," NP_C3 ".jsx)(" NP_C6 ",{details:" NP_C2 ".details}),""(0," NP_C3 ".jsx)(" NP_C7 ".G,{setting:\"compat_show_all_tools\",label:(0," NP_C5 ".we)"@@ -411,24 +421,30 @@ static const np_gate_t g_gates_selecttool[] = {"(\"#Settings_SteamPlay_SteamPlay\"),children:[(0," NP_C3 ".jsx)(" NP_C6 ",{details:" NP_C2 ".details}),""(0," NP_C3 ".jsx)(" NP_C7 ".G,{setting:\"compat_show_all_tools\",label:(0," NP_C5 ".we)""(\"#Settings_SteamPlay_ShowAll\"),feature:" NP_C8 ".OK})]}),"- "(0," NP_C3 ".jsx)(MSCXOpts,{details:" NP_C2 ".details})]})}", 1 },+ "(0," NP_C3 ".jsx)(MSCXOpts,{details:" NP_C2 ".details})]})}", 1, 0 },+ // Compatibility Tool selector, wrapped to drop settings a FEX tool cannot use+ { "[" NP_C1 "," NP_C2 "]=(0," NP_C3 ".cT)(" NP_C4 ");if(" NP_C1 ".isLoading||!" NP_C1+ ".data?.tools?.length)return null;",+ "[" NP_C1 "," NP_C2 "]=(typeof MSCXToolQuery==\"function\"?MSCXToolQuery:r=>r)"+ "((0," NP_C3 ".cT)(" NP_C4 ")," NP_C4 ");if(" NP_C1+ ".isLoading||!" NP_C1 ".data?.tools?.length)return null;", 1, 1 },{ "get is_invalid_os_type(){return this.most_available_per_client_data.is_invalid_os_type}",- "get is_invalid_os_type(){return false}", 1 },+ "get is_invalid_os_type(){return false}", 1, 0 },// Reminder banner for 32 bit Mac games{ NP_C1 ".is_invalid_os_type&&(0," NP_C2 ".jsx)(" NP_C3 ",{})","!" NP_C1 ".local_per_client_data?.installed&&"NP_C1 ".most_available_per_client_data?.is_invalid_os_type&&"- "(0," NP_C2 ".jsx)(" NP_C3 ",{})", 1 },+ "(0," NP_C2 ".jsx)(" NP_C3 ",{})", 1, 0 },{ "(0," NP_C1 ".we)(\"#GameList_Entry_Invalid_OSType2\")",- NP_COMPAT_HINT, 1 },+ NP_COMPAT_HINT, 1, 0 },};static const np_gate_t g_fixes[] = {{ "(\"#AddNonSteam_Filter_Exe_MacOS\"),rFilePatterns:[\"*.app\"]",- "(\"#AddNonSteam_Filter_Exe_MacOS\"),rFilePatterns:[\"*.app\",\"*.exe\"]", 1 },+ "(\"#AddNonSteam_Filter_Exe_MacOS\"),rFilePatterns:[\"*.app\",\"*.exe\"]", 1, 0 },{ "{strFileTypeName:\"Image Files (*.tga,*.png)\",rFilePatterns:[\"*.tga\",\"*.png\"]}","{strFileTypeName:" NP_IMAGE_FILES_LABEL ","- "rFilePatterns:[\"*.tga\",\"*.png\",\"*.exe\"]}", 1 },+ "rFilePatterns:[\"*.tga\",\"*.png\",\"*.exe\"]}", 1, 0 },// Makes Steam's default compatibility tool setting work{ "r=(0,s.q3)(()=>u.rV.settings.bCompatEnabled),a=function(e,t){const[r,i]=n.useState([]);""return n.useEffect(()=>{SteamClient.Apps.GetAvailableCompatTools(e).then(i)},[e,t]),r}"@@ -438,7 +454,7 @@ static const np_gate_t g_fixes[] = {"return n.useEffect(()=>{SteamClient.Apps.GetAvailableCompatTools(e).then(i)},[e,t]),r}""(t.unAppID,r),o=r&&!!t.strCompatToolName&&t.nCompatToolPriority==h.JN,""l=a.length?(a.find(e=>e.strToolName===u.rV.settings.strCompatTool)||a[0]).strToolName:\"\"",- 1 },+ 1, 0 },// Shows the default tool picker before a default has been saved{ "return " NP_C1 "?(0," NP_C2 ".jsx)(" NP_C3 ".B,{feature:" NP_C4 ".OK,label:(0," NP_C5 ".we)""(\"#Settings_SteamPlay_DefaultTool\"),rgOptions:" NP_C6 ",disabled:0==" NP_C6 ".length,"@@ -447,9 +463,9 @@ static const np_gate_t g_fixes[] = {NP_C3 ".B,{feature:" NP_C4 ".OK,label:(0," NP_C5 ".we)""(\"#Settings_SteamPlay_DefaultTool\"),rgOptions:" NP_C6 ",disabled:0==" NP_C6 ".length,""selectedOption:" NP_C1 "||\"" NP_FALLBACK_TOOL "\",",- 1 },+ 1, 0 },{ "this.m_bServicesInitialized=!0,SteamClient.UI.NotifyAppInitialized()",- "this.m_bServicesInitialized=!0," NP_LAUNCH_MIGRATION ",SteamClient.UI.NotifyAppInitialized()", 1 },+ "this.m_bServicesInitialized=!0," NP_LAUNCH_MIGRATION ",SteamClient.UI.NotifyAppInitialized()", 1, 0 },};#define NP_FIX_COUNT (sizeof(g_fixes) / sizeof(g_fixes[0]))@@ -467,6 +483,8 @@ static const np_ui_shape_t g_shapes[] = {g_gates_selecttool, sizeof(g_gates_selecttool) / sizeof(g_gates_selecttool[0]) },};#define NP_SHAPE_COUNT (sizeof(g_shapes) / sizeof(g_shapes[0]))+_Static_assert(sizeof(g_gates_forcetool) / sizeof(np_gate_t) <= NP_GATE_MAX, "gate table too long");+_Static_assert(sizeof(g_gates_selecttool) / sizeof(np_gate_t) <= NP_GATE_MAX, "gate table too long");static int has_suffix(const char *s, const char *suf) {size_t ls = strlen(s), lf = strlen(suf);@@ -528,6 +546,8 @@ char *np_webpatch_transform(const uint8_t *src, size_t src_len, size_t *out_len,if (!shape && !fix_live)return NULL; // Not the part carrying the compat UI.+ int gate_on[NP_GATE_MAX] = {0};+ size_t gate_live = 0;if (shape) {if (out_shape)*out_shape = shape->name;@@ -535,7 +555,12 @@ char *np_webpatch_transform(const uint8_t *src, size_t src_len, size_t *out_len,int drifted = 0;for (size_t g = 0; g < shape->count; g++) {size_t n = count_matches(s, src_len, shape->gates[g].find);- if (n != (size_t)shape->gates[g].expect) {+ gate_on[g] = n == (size_t)shape->gates[g].expect;+ if (gate_on[g]) { gate_live++; continue; }+ if (shape->gates[g].optional) {+ NP_WARN("webpatch: [%s] optional gate %zu expected %d occurrence(s), "+ "found %zu; skipping it", shape->name, g, shape->gates[g].expect, n);+ } else {NP_WARN("webpatch: [%s] gate %zu expected %d occurrence(s), found %zu",shape->name, g, shape->gates[g].expect, n);drifted = 1;@@ -554,6 +579,7 @@ char *np_webpatch_transform(const uint8_t *src, size_t src_len, size_t *out_len,const np_gate_t *hit = NULL;size_t used = 0;for (size_t g = 0; shape && g < shape->count; g++) {+ if (!gate_on[g]) continue;used = match_at(s, src_len, i, shape->gates[g].find, caps);if (used) { hit = &shape->gates[g]; break; }}@@ -572,6 +598,6 @@ char *np_webpatch_transform(const uint8_t *src, size_t src_len, size_t *out_len,out.buf[out.len] = '\0';*out_len = out.len;NP_LOG("webpatch: [%s] %zu gates, %zu fixes applied",- shape ? shape->name : "no compat UI", shape ? shape->count : 0, fix_live);+ shape ? shape->name : "no compat UI", gate_live, fix_live);return out.buf;}diff --git a/dylib/tests/gatecheck.c b/dylib/tests/gatecheck.cindex fafe4ef..9c2741d 100644--- a/dylib/tests/gatecheck.c+++ b/dylib/tests/gatecheck.c@@ -185,8 +185,12 @@ static void selfcheck(void) {if (strcmp(S->probe, g_shapes[o].probe) == 0)wrong("[%s] and [%s] share a probe", nm, g_shapes[o].name);}- for (size_t i = 0; i < S->count; i++)+ size_t required = 0;+ for (size_t i = 0; i < S->count; i++) {check_gate(nm, i, &S->gates[i], S->gates, S->count);+ required += !S->gates[i].optional;+ }+ if (!required) wrong("[%s] has no required gate", nm);total += S->count;}@@ -230,10 +234,16 @@ static const np_ui_shape_t *shape_of(const char *buf, size_t len) {return NULL;}-static void check_output(const char *out, size_t out_len) {+static void check_output(const char *out, size_t out_len, const int *applied) {const np_ui_shape_t *S = shape_of(out, out_len);if (!S) { wrong("the patched chunk no longer matches any known compat UI"); return; }for (size_t g = 0; g < S->count; g++) {+ if (!applied[g]) {+ if (count_matches(out, out_len, S->gates[g].replace))+ wrong("[%s] optional gate %zu was skipped but its replacement is in the patch",+ S->name, g);+ continue;+ }if (count_matches(out, out_len, S->gates[g].find) != 0)wrong("[%s] gate %zu anchor survived the patch", S->name, g);if (count_matches(out, out_len, S->gates[g].replace)@@ -306,6 +316,36 @@ static int extract(const char *chunk, const char *out_path) {return 0;}+static void check_optional_drift(const np_ui_shape_t *S, size_t g, const uint8_t *buf,+ size_t len, const int *applied) {+ char *copy = malloc(len + 1);+ if (!copy) { wrong("out of memory"); return; }+ memcpy(copy, buf, len + 1);+ np_cap_t caps[NP_CAP_MAX];+ for (size_t i = 0; i < len; ) {+ size_t used = match_at(copy, len, i, S->gates[g].find, caps);+ if (!used) { i++; continue; }+ copy[i + used - 1] = '\x01';+ i += used;+ }+ int without[NP_GATE_MAX];+ memcpy(without, applied, sizeof(without));+ without[g] = 0;++ int saved = np_log_level;+ np_log_level = -1;+ size_t out_len = 0;+ char *out = np_webpatch_transform((const uint8_t *)copy, len, &out_len, NULL);+ np_log_level = saved;+ if (out) {+ check_output(out, out_len, without);+ free(out);+ } else {+ wrong("[%s] drift in optional gate %zu left the whole shape unpatched", S->name, g);+ }+ free(copy);+}+int main(int argc, char **argv) {if (argc == 4 && strcmp(argv[1], "--extract") == 0)return extract(argv[2], argv[3]);@@ -323,12 +363,21 @@ int main(int argc, char **argv) {uint8_t *buf = slurp(argv[i], &len);if (!buf) { wrong("cannot read %s", argv[i]); continue; }+ const np_ui_shape_t *S = shape_of((const char *)buf, len);+ int applied[NP_GATE_MAX] = {0};+ for (size_t g = 0; S && g < S->count; g++)+ applied[g] = count_matches((const char *)buf, len, S->gates[g].find)+ == (size_t)S->gates[g].expect;+size_t out_len = 0;char *out = np_webpatch_transform(buf, len, &out_len, NULL);if (out) {- check_output(out, out_len);+ check_output(out, out_len, applied);printf("APPLIED %s\n", argv[i]);free(out);+ for (size_t g = 0; S && g < S->count; g++)+ if (S->gates[g].optional && applied[g])+ check_optional_drift(S, g, buf, len, applied);} else {printf("REJECTED %s\n", argv[i]);}diff --git a/dylib/tests/panel-behavior/fex.js b/dylib/tests/panel-behavior/fex.jsindex ad1d88f..74a5efd 100644--- a/dylib/tests/panel-behavior/fex.js+++ b/dylib/tests/panel-behavior/fex.js@@ -79,9 +79,9 @@ for (const form of Object.keys(FORMS)) {failed += tp.failed;}-{- const { pick, written } = panel(emit, 'component', undefined, { fexTools: FEX_TOOLS });- const t = runner('component, picking a tool');+for (const form of Object.keys(FORMS)) {+ const { pick, written } = panel(emit, form, undefined, { fexTools: FEX_TOOLS });+ const t = runner(`${form}, picking a tool`);const choose = (opts, tool) => {written.length = 0;pick(details(opts), tool);@@ -104,5 +104,40 @@ for (const form of Object.keys(FORMS)) {'text after the game, not set before %command%, is left alone');failed += t.failed;}++{+ const opts = 'CX_GRAPHICS_BACKEND=d3dmetal MTL_HUD_ENABLED=1 %command%';+ const globals = { document: { documentElement: { lang: 'en' } },+ appDetailsStore: { GetAppDetails: id => id === 287700 ? details(opts) : undefined } };+ const { toolQuery, written } = panel(emit, 'statement', globals,+ { fallback: 'notproton-fex', fexTools: FEX_TOOLS });+ const t = runner('statement, the new tool picker');+ const data = { default_tool_identifier: 'notproton-fex',+ aliases: [{ alias: 'np-latest', current_tool_name: 'notproton-fex' },+ { alias: 'np-rosetta', current_tool_name: 'notproton-rosetta' }] };+ const choose = (value, id = 287700, d = data) => {+ const saved = [];+ written.length = 0;+ const [query, set] = toolQuery([{ data: d }, v => saved.push(v)], id);+ set(value);+ return { query, saved, opts: written.length ? written[written.length - 1].opts : null };+ };+ let r = choose('notproton-fex');+ t.ok(r.saved[0] === 'notproton-fex' && r.query.data === data, 'the query and the pick still reach Steam');+ t.ok(r.opts === 'MTL_HUD_ENABLED=1 %command%', `picking FEX drops the D3DMetal entry (${r.opts})`);+ t.ok(choose('').opts === 'MTL_HUD_ENABLED=1 %command%', 'the default entry counts as the default tool');+ t.ok(choose('', 287700, { ...data, default_tool_identifier: '' }).opts === 'MTL_HUD_ENABLED=1 %command%',+ 'with no default saved, the default entry counts as the fallback tool');+ t.ok(choose('', 287700, { ...data, default_tool_identifier: 'notproton-rosetta' }).opts === null,+ 'a Rosetta default wins over a FEX fallback');+ t.ok(choose('np-latest').opts === 'MTL_HUD_ENABLED=1 %command%', 'an alias counts as its current tool');+ t.ok(choose('np-rosetta').opts === null, 'an alias for a Rosetta tool writes nothing');+ t.ok(choose('notproton-rosetta').opts === null, 'picking a Rosetta tool writes nothing');+ r = choose('notproton-fex', null);+ t.ok(r.saved[0] === 'notproton-fex' && r.opts === null, 'the settings page picker has no game to edit');+ t.ok(choose('notproton-fex', 4000).opts === null, 'a game with no loaded details is left alone');+ t.ok(choose('notproton-fex', 287700, null).opts === null, 'a picker with no tool list writes nothing');+ failed += t.failed;+}console.log(failed ? `\n${failed} failure(s)` : '\nFEX hides what it cannot run, Rosetta keeps everything');process.exit(failed ? 1 : 0);diff --git a/dylib/tests/panel-behavior/harness.js b/dylib/tests/panel-behavior/harness.jsindex eab2afc..23b9910 100644--- a/dylib/tests/panel-behavior/harness.js+++ b/dylib/tests/panel-behavior/harness.js@@ -36,9 +36,10 @@ function panel(emit, form, globals = { document: { documentElement: { lang: 'en'Apps: { SetAppLaunchOptions: (appid, opts) => written.push({ appid, opts }) },};const build = new Function(names[0], names[1], 'SteamClient', 'globalThis',- src + '\nreturn { MSCXOpts, MSCXPick: typeof MSCXPick === "function" ? MSCXPick : null };');- const { MSCXOpts, MSCXPick } = build(react, barrel, SteamClient, globals);- return { render: MSCXOpts, pick: MSCXPick, written };+ src + '\nreturn { MSCXOpts, MSCXPick: typeof MSCXPick === "function" ? MSCXPick : null,' ++ ' MSCXToolQuery: typeof MSCXToolQuery === "function" ? MSCXToolQuery : null };');+ const { MSCXOpts, MSCXPick, MSCXToolQuery } = build(react, barrel, SteamClient, globals);+ return { render: MSCXOpts, pick: MSCXPick, toolQuery: MSCXToolQuery, written };}// Function components are resolved rather than recorded, so a check sees the nodes thediff --git a/dylib/tests/webpatch-fixtures/gates.selecttool-rebuilt.js b/dylib/tests/webpatch-fixtures/gates.selecttool-rebuilt.jsindex 41f7e7b..ecd04f8 100644--- a/dylib/tests/webpatch-fixtures/gates.selecttool-rebuilt.js+++ b/dylib/tests/webpatch-fixtures/gates.selecttool-rebuilt.js@@ -6,3 +6,4 @@ r_client_data.active_beta}get is_available_on_current_platform(){return this.locePlayBar,bInPage:!0,details:le,overview:We,stickyheader:Re,onGameInfoToggle:xe,onSeek:Xe.SeekToSection,bShowInfoExpanded:vt,bShowingLaunchDetails:zt},We.appid),We.is_invalid_os_type&&(0,e.jsx)(U,{}),Me.has("info")&&(0,e.jsx)(S.b,{concise:fe,overview:We,details:le,expand:vt,suppressTransition:At}),(0,e.jsx)(x.Qd,{overview:We,details:le,workshopVisible:St,ma,{})}),(0,h.we)("#GameList_Entry_Invalid_OSType")]}),(0,e.jsx)("div",{className:Q().WarningText,children:(0,e.jsxs)("div",{className:Q().WarningText2,children:[(0,h.we)("#GameList_Entry_Invalid_OSType2"),(0,e.jsx)("a",{href:"https://help.steampowered.com/faqs/view/5E0D-522A-4E62-B6EF",className:Q().WarningText3,children:(0,h.we)("#GameList_Entry_Invalid_OSType3function Ae(Rj){return(0,Zq.jsxs)(Vt.XY,{label:(0,Nb.we)("#Settings_SteamPlay_SteamPlay"),children:[(0,Zq.jsx)(Ug,{}),(0,Zq.jsx)(Kx.G,{setting:"compat_show_all_tools",label:(0,Nb.we)("#Settings_SteamPlay_ShowAll"),feature:Ld.OK})]})}function Yc(Rj){return(0,Zq.jsx)(Bf.sh,{children:(0,Zq.jsx)(Ae,{})})}function Pm(Rj){return(0,Zq.jsxs)(Vt.XY,{label:(0,Nb.we)("#Settings_SteamPlay_SteamPlay"),children:[(0,Zq.jsx)(Hw,{details:Rj.details}),(0,Zq.jsx)(Kx.G,{setting:"compat_show_all_tools",label:(0,Nb.we)("#Settings_SteamPlay_ShowAll"),feature:Ld.OK})]})}})+display_name);return(0,Nb.uH)(Sx,(0,Zq.jsx)("b",{}))}}return(0,Zq.jsx)(Zq.Fragment,{})}function Pk(Rj){const{label:Wc,nAppId:Hb}=Rj,[Dq]=(0,Zh.VI)("compat_show_all_tools"),[Qk,Wm]=(0,Zr.cT)(Hb);if(Qk.isLoading||!Qk.data?.tools?.length)return null;let Jb=[];for(const Xe of Qk.data.aliases)Jb.push({data:Xe.alias,label:Xe.display_name});let Ov=null;for(const Xe of Qk.data.tools)Xe.is_active&&(Ov=Xe),!(!Dq&&!Xe.is_active&diff --git a/dylib/tests/webpatch-fixtures/gates.selecttool.js b/dylib/tests/webpatch-fixtures/gates.selecttool.jsindex 6fd47d1..b8643d5 100644--- a/dylib/tests/webpatch-fixtures/gates.selecttool.js+++ b/dylib/tests/webpatch-fixtures/gates.selecttool.js@@ -6,3 +6,4 @@ r_client_data.active_beta}get is_available_on_current_platform(){return this.locePlayBar,bInPage:!0,details:le,overview:We,stickyheader:Re,onGameInfoToggle:xe,onSeek:Xe.SeekToSection,bShowInfoExpanded:vt,bShowingLaunchDetails:zt},We.appid),We.is_invalid_os_type&&(0,e.jsx)(U,{}),Me.has("info")&&(0,e.jsx)(S.b,{concise:fe,overview:We,details:le,expand:vt,suppressTransition:At}),(0,e.jsx)(x.Qd,{overview:We,details:le,workshopVisible:St,ma,{})}),(0,h.we)("#GameList_Entry_Invalid_OSType")]}),(0,e.jsx)("div",{className:Q().WarningText,children:(0,e.jsxs)("div",{className:Q().WarningText2,children:[(0,h.we)("#GameList_Entry_Invalid_OSType2"),(0,e.jsx)("a",{href:"https://help.steampowered.com/faqs/view/5E0D-522A-4E62-B6EF",className:Q().WarningText3,children:(0,h.we)("#GameList_Entry_Invalid_OSType3function I(f){return(0,e.jsxs)(a.XY,{label:(0,i.we)("#Settings_SteamPlay_SteamPlay"),children:[(0,e.jsx)(P,{}),(0,e.jsx)(c.G,{setting:"compat_show_all_tools",label:(0,i.we)("#Settings_SteamPlay_ShowAll"),feature:o.OK})]})}function W(f){return(0,e.jsx)(u.sh,{children:(0,e.jsx)(I,{})})}function C(f){return(0,e.jsxs)(a.XY,{label:(0,i.we)("#Settings_SteamPlay_SteamPlay"),children:[(0,e.jsx)(y,{details:f.details}),(0,e.jsx)(c.G,{setting:"compat_show_all_tools",label:(0,i.we)("#Settings_SteamPlay_ShowAll"),feature:o.OK})]})}})+display_name);return(0,r.uH)(S,(0,e.jsx)("b",{}))}}return(0,e.jsx)(e.Fragment,{})}function w(g){const{label:C,nAppId:P}=g,[D]=(0,h.VI)("compat_show_all_tools"),[z,S]=(0,l.cT)(P);if(z.isLoading||!z.data?.tools?.length)return null;let b=[];for(const T of z.data.aliases)b.push({data:T.alias,label:T.display_name});let O=null;for(const T of z.data.tools)T.is_active&&(O=T),!(!D&&!T.is_active&