mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Define types for Patcher
This commit is contained in:
parent
2f8c776133
commit
b463e4f014
53
dist/better-xcloud.pretty.user.js
vendored
53
dist/better-xcloud.pretty.user.js
vendored
@ -5186,8 +5186,7 @@ class PatcherUtils {
|
|||||||
var LOG_TAG2 = "Patcher", PATCHES = {
|
var LOG_TAG2 = "Patcher", PATCHES = {
|
||||||
disableAiTrack(str) {
|
disableAiTrack(str) {
|
||||||
let text = ".track=function(", index = str.indexOf(text);
|
let text = ".track=function(", index = str.indexOf(text);
|
||||||
if (index < 0) return !1;
|
if (index < 0 || PatcherUtils.indexOf(str, '"AppInsightsCore', index, 200) < 0) return !1;
|
||||||
if (PatcherUtils.indexOf(str, '"AppInsightsCore', index, 200) < 0) return !1;
|
|
||||||
return PatcherUtils.replaceWith(str, index, text, ".track=function(e){},!!function(");
|
return PatcherUtils.replaceWith(str, index, text, ".track=function(e){},!!function(");
|
||||||
},
|
},
|
||||||
disableTelemetry(str) {
|
disableTelemetry(str) {
|
||||||
@ -5734,32 +5733,32 @@ ${subsVar} = subs;
|
|||||||
] : [],
|
] : [],
|
||||||
"exposeReactCreateComponent",
|
"exposeReactCreateComponent",
|
||||||
"injectCreatePortal",
|
"injectCreatePortal",
|
||||||
"injectGuideHomeUseEffect",
|
"broadcastPollingMode",
|
||||||
"injectHeaderUseEffect",
|
getGlobalPref("ui.gameCard.waitTime.show") && "patchSetCurrentFocus",
|
||||||
"injectErrorPageUseEffect",
|
"patchGamepadPolling",
|
||||||
"injectAchievementsProgressUseEffect",
|
"optimizeGameSlugGenerator",
|
||||||
"injectAchievementsDetailUseEffect",
|
"modifyPreloadedState",
|
||||||
"gameCardCustomIcons",
|
"detectBrowserRouterReady",
|
||||||
|
"exposeStreamSession",
|
||||||
|
"supportLocalCoOp",
|
||||||
|
"disableStreamGate",
|
||||||
|
"exposeDialogRoutes",
|
||||||
...getGlobalPref("ui.imageQuality") < 90 ? [
|
...getGlobalPref("ui.imageQuality") < 90 ? [
|
||||||
"setImageQuality"
|
"setImageQuality"
|
||||||
] : [],
|
] : [],
|
||||||
"modifyPreloadedState",
|
|
||||||
"optimizeGameSlugGenerator",
|
|
||||||
"detectBrowserRouterReady",
|
|
||||||
"patchRequestInfoCrash",
|
"patchRequestInfoCrash",
|
||||||
"disableStreamGate",
|
"injectErrorPageUseEffect",
|
||||||
"broadcastPollingMode",
|
|
||||||
"patchGamepadPolling",
|
|
||||||
"exposeStreamSession",
|
|
||||||
"exposeDialogRoutes",
|
|
||||||
"homePageBeforeLoad",
|
|
||||||
"productDetailPageBeforeLoad",
|
|
||||||
"streamPageBeforeLoad",
|
"streamPageBeforeLoad",
|
||||||
|
"injectGuideHomeUseEffect",
|
||||||
|
"injectAchievementsProgressUseEffect",
|
||||||
|
"injectAchievementsDetailUseEffect",
|
||||||
"guideAchievementsDefaultLocked",
|
"guideAchievementsDefaultLocked",
|
||||||
|
"injectHeaderUseEffect",
|
||||||
|
"homePageBeforeLoad",
|
||||||
|
"gameCardCustomIcons",
|
||||||
|
"productDetailPageBeforeLoad",
|
||||||
"enableTvRoutes",
|
"enableTvRoutes",
|
||||||
"supportLocalCoOp",
|
|
||||||
"overrideStorageGetSettings",
|
"overrideStorageGetSettings",
|
||||||
getGlobalPref("ui.gameCard.waitTime.show") && "patchSetCurrentFocus",
|
|
||||||
getGlobalPref("ui.layout") !== "default" && "websiteLayout",
|
getGlobalPref("ui.layout") !== "default" && "websiteLayout",
|
||||||
getGlobalPref("game.fortnite.forceConsole") && "forceFortniteConsole",
|
getGlobalPref("game.fortnite.forceConsole") && "forceFortniteConsole",
|
||||||
...STATES.userAgent.capabilities.touch ? [
|
...STATES.userAgent.capabilities.touch ? [
|
||||||
@ -5773,11 +5772,11 @@ ${subsVar} = subs;
|
|||||||
"disableTelemetryProvider"
|
"disableTelemetryProvider"
|
||||||
] : [],
|
] : [],
|
||||||
...getGlobalPref("xhome.enabled") ? [
|
...getGlobalPref("xhome.enabled") ? [
|
||||||
"remotePlayKeepAlive",
|
|
||||||
"remotePlayDirectConnectUrl",
|
"remotePlayDirectConnectUrl",
|
||||||
|
"remotePlayKeepAlive",
|
||||||
|
"remotePlayWebTitle",
|
||||||
"remotePlayDisableAchievementToast",
|
"remotePlayDisableAchievementToast",
|
||||||
"remotePlayRecentlyUsedTitleIds",
|
"remotePlayRecentlyUsedTitleIds",
|
||||||
"remotePlayWebTitle",
|
|
||||||
STATES.userAgent.capabilities.touch && "patchUpdateInputConfigurationAsync"
|
STATES.userAgent.capabilities.touch && "patchUpdateInputConfigurationAsync"
|
||||||
] : [],
|
] : [],
|
||||||
...BX_FLAGS.EnableXcloudLogging ? [
|
...BX_FLAGS.EnableXcloudLogging ? [
|
||||||
@ -5785,16 +5784,14 @@ ${subsVar} = subs;
|
|||||||
"enableXcloudLogger"
|
"enableXcloudLogger"
|
||||||
] : []
|
] : []
|
||||||
]), hideSections = getGlobalPref("ui.hideSections"), HOME_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
]), hideSections = getGlobalPref("ui.hideSections"), HOME_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
hideSections.includes("news") && "ignoreNewsSection",
|
|
||||||
(getGlobalPref("block.features").includes("friends") || hideSections.includes("friends")) && "ignorePlayWithFriendsSection",
|
|
||||||
hideSections.includes("all-games") && "ignoreAllGamesSection",
|
|
||||||
hideSections.includes("genres") && "ignoreGenresSection",
|
hideSections.includes("genres") && "ignoreGenresSection",
|
||||||
!getGlobalPref("block.features").includes("byog") && hideSections.includes("byog") && "ignoreByogSection",
|
!getGlobalPref("block.features").includes("byog") && hideSections.includes("byog") && "ignoreByogSection",
|
||||||
STATES.browser.capabilities.touch && hideSections.includes("touch") && "ignorePlayWithTouchSection",
|
STATES.browser.capabilities.touch && hideSections.includes("touch") && "ignorePlayWithTouchSection",
|
||||||
|
getGlobalPref("ui.imageQuality") < 90 && "setBackgroundImageQuality",
|
||||||
hideSections.some((value) => ["native-mkb", "most-popular"].includes(value)) && "ignoreSiglSections",
|
hideSections.some((value) => ["native-mkb", "most-popular"].includes(value)) && "ignoreSiglSections",
|
||||||
...getGlobalPref("ui.imageQuality") < 90 ? [
|
hideSections.includes("news") && "ignoreNewsSection",
|
||||||
"setBackgroundImageQuality"
|
(getGlobalPref("block.features").includes("friends") || hideSections.includes("friends")) && "ignorePlayWithFriendsSection",
|
||||||
] : [],
|
hideSections.includes("all-games") && "ignoreAllGamesSection",
|
||||||
...blockSomeNotifications() ? [
|
...blockSomeNotifications() ? [
|
||||||
"changeNotificationsSubscription"
|
"changeNotificationsSubscription"
|
||||||
] : []
|
] : []
|
||||||
|
6
dist/better-xcloud.user.js
vendored
6
dist/better-xcloud.user.js
vendored
File diff suppressed because one or more lines are too long
@ -1,3 +1,4 @@
|
|||||||
|
import type { ScriptEvents, StreamEvents } from "@/utils/bx-event-bus";
|
||||||
import type { PatchArray, PatchName, PatchPage } from "./patcher";
|
import type { PatchArray, PatchName, PatchPage } from "./patcher";
|
||||||
|
|
||||||
export class PatcherUtils {
|
export class PatcherUtils {
|
||||||
@ -35,7 +36,7 @@ export class PatcherUtils {
|
|||||||
return txt.substring(0, index) + toString + txt.substring(index + fromString.length);
|
return txt.substring(0, index) + toString + txt.substring(index + fromString.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
static filterPatches(patches: Array<string | false>): PatchArray {
|
static filterPatches(patches: Array<PatchName | false>): PatchArray {
|
||||||
return patches.filter((item): item is PatchName => !!item);
|
return patches.filter((item): item is PatchName => !!item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ export class PatcherUtils {
|
|||||||
return str.substring(start, end);
|
return str.substring(start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
static injectUseEffect(str: string, index: number, group: 'Stream' | 'Script', eventName: string) {
|
static injectUseEffect<T extends 'Stream' | 'Script'>(str: string, index: number, group: T, eventName: T extends 'Stream' ? keyof StreamEvents : keyof ScriptEvents) {
|
||||||
const newCode = `window.BX_EXPOSED.reactUseEffect(() => window.BxEventBus.${group}.emit('${eventName}', {}), []);`;
|
const newCode = `window.BX_EXPOSED.reactUseEffect(() => window.BxEventBus.${group}.emit('${eventName}', {}), []);`;
|
||||||
str = PatcherUtils.insertAt(str, index, newCode);
|
str = PatcherUtils.insertAt(str, index, newCode);
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import { PatcherUtils } from "./patcher-utils.js";
|
|||||||
export type PatchName = keyof typeof PATCHES;
|
export type PatchName = keyof typeof PATCHES;
|
||||||
export type PatchArray = PatchName[];
|
export type PatchArray = PatchName[];
|
||||||
export type PatchPage = 'home' | 'stream' | 'product-detail';
|
export type PatchPage = 'home' | 'stream' | 'product-detail';
|
||||||
|
type PatchFunction = (str: string) => string | false;
|
||||||
|
|
||||||
const LOG_TAG = 'Patcher';
|
const LOG_TAG = 'Patcher';
|
||||||
|
|
||||||
@ -31,11 +32,7 @@ const PATCHES = {
|
|||||||
disableAiTrack(str: string) {
|
disableAiTrack(str: string) {
|
||||||
let text = '.track=function(';
|
let text = '.track=function(';
|
||||||
const index = str.indexOf(text);
|
const index = str.indexOf(text);
|
||||||
if (index < 0) {
|
if (index < 0 || PatcherUtils.indexOf(str, '"AppInsightsCore', index, 200) < 0) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PatcherUtils.indexOf(str, '"AppInsightsCore', index, 200) < 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1204,62 +1201,95 @@ ${subsVar} = subs;
|
|||||||
|
|
||||||
return PatcherUtils.injectUseEffect(str, index, 'Script', 'ui.guideAchievementDetail.rendered');
|
return PatcherUtils.injectUseEffect(str, index, 'Script', 'ui.guideAchievementDetail.rendered');
|
||||||
},
|
},
|
||||||
};
|
|
||||||
|
/*
|
||||||
|
patchBasicGameInfo(str: string) {
|
||||||
|
let index = str.indexOf('.ChildXboxTitleIds,offerings');
|
||||||
|
index > -1 && (index = PatcherUtils.lastIndexOf(str, 'return{', index, 1000));
|
||||||
|
if (index < 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const varName = PatcherUtils.getVariableNameBefore(str, PatcherUtils.lastIndexOf(str, '=>{', index));
|
||||||
|
if (!varName) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newCode = `
|
||||||
|
const info = ${varName};
|
||||||
|
if (info.ProductTitle.includes('Xbox One')) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
str = PatcherUtils.insertAt(str, index, newCode);
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
} as const satisfies { [key: string]: PatchFunction };
|
||||||
|
|
||||||
let PATCH_ORDERS = PatcherUtils.filterPatches([
|
let PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
...(AppInterface && getGlobalPref(GlobalPref.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
...(AppInterface && getGlobalPref(GlobalPref.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
||||||
'enableNativeMkb',
|
'enableNativeMkb',
|
||||||
'disableAbsoluteMouse',
|
'disableAbsoluteMouse',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
|
|
||||||
'exposeReactCreateComponent',
|
'exposeReactCreateComponent',
|
||||||
|
|
||||||
'injectCreatePortal',
|
'injectCreatePortal',
|
||||||
'injectGuideHomeUseEffect',
|
|
||||||
'injectHeaderUseEffect',
|
'broadcastPollingMode',
|
||||||
|
|
||||||
|
getGlobalPref(GlobalPref.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentFocus',
|
||||||
|
|
||||||
|
'patchGamepadPolling',
|
||||||
|
|
||||||
|
'optimizeGameSlugGenerator',
|
||||||
|
|
||||||
|
'modifyPreloadedState',
|
||||||
|
|
||||||
|
'detectBrowserRouterReady',
|
||||||
|
|
||||||
|
'exposeStreamSession',
|
||||||
|
'supportLocalCoOp',
|
||||||
|
|
||||||
|
'disableStreamGate',
|
||||||
|
|
||||||
|
'exposeDialogRoutes',
|
||||||
|
|
||||||
|
...(getGlobalPref(GlobalPref.UI_IMAGE_QUALITY) < 90 ? [
|
||||||
|
'setImageQuality',
|
||||||
|
] : []) as PatchArray,
|
||||||
|
|
||||||
|
'patchRequestInfoCrash',
|
||||||
|
|
||||||
'injectErrorPageUseEffect',
|
'injectErrorPageUseEffect',
|
||||||
|
|
||||||
|
'streamPageBeforeLoad',
|
||||||
|
|
||||||
|
'injectGuideHomeUseEffect',
|
||||||
'injectAchievementsProgressUseEffect',
|
'injectAchievementsProgressUseEffect',
|
||||||
'injectAchievementsDetailUseEffect',
|
'injectAchievementsDetailUseEffect',
|
||||||
|
'guideAchievementsDefaultLocked',
|
||||||
|
|
||||||
|
'injectHeaderUseEffect',
|
||||||
|
|
||||||
|
'homePageBeforeLoad',
|
||||||
|
|
||||||
'gameCardCustomIcons',
|
'gameCardCustomIcons',
|
||||||
// 'gameCardPassTitle',
|
// 'gameCardPassTitle',
|
||||||
|
|
||||||
...(getGlobalPref(GlobalPref.UI_IMAGE_QUALITY) < 90 ? [
|
|
||||||
'setImageQuality',
|
|
||||||
] : []),
|
|
||||||
|
|
||||||
'modifyPreloadedState',
|
|
||||||
|
|
||||||
'optimizeGameSlugGenerator',
|
|
||||||
|
|
||||||
'detectBrowserRouterReady',
|
|
||||||
'patchRequestInfoCrash',
|
|
||||||
|
|
||||||
'disableStreamGate',
|
|
||||||
'broadcastPollingMode',
|
|
||||||
'patchGamepadPolling',
|
|
||||||
|
|
||||||
'exposeStreamSession',
|
|
||||||
'exposeDialogRoutes',
|
|
||||||
|
|
||||||
'homePageBeforeLoad',
|
|
||||||
'productDetailPageBeforeLoad',
|
'productDetailPageBeforeLoad',
|
||||||
'streamPageBeforeLoad',
|
|
||||||
|
|
||||||
'guideAchievementsDefaultLocked',
|
|
||||||
|
|
||||||
'enableTvRoutes',
|
'enableTvRoutes',
|
||||||
|
|
||||||
'supportLocalCoOp',
|
|
||||||
'overrideStorageGetSettings',
|
'overrideStorageGetSettings',
|
||||||
getGlobalPref(GlobalPref.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentFocus',
|
|
||||||
|
|
||||||
getGlobalPref(GlobalPref.UI_LAYOUT) !== UiLayout.DEFAULT && 'websiteLayout',
|
getGlobalPref(GlobalPref.UI_LAYOUT) !== UiLayout.DEFAULT && 'websiteLayout',
|
||||||
getGlobalPref(GlobalPref.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',
|
getGlobalPref(GlobalPref.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',
|
||||||
|
|
||||||
...(STATES.userAgent.capabilities.touch ? [
|
...(STATES.userAgent.capabilities.touch ? [
|
||||||
'disableTouchContextMenu',
|
'disableTouchContextMenu',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
|
|
||||||
...(getGlobalPref(GlobalPref.BLOCK_TRACKING) ? [
|
...(getGlobalPref(GlobalPref.BLOCK_TRACKING) ? [
|
||||||
'disableAiTrack',
|
'disableAiTrack',
|
||||||
@ -1269,41 +1299,41 @@ let PATCH_ORDERS = PatcherUtils.filterPatches([
|
|||||||
'disableIndexDbLogging',
|
'disableIndexDbLogging',
|
||||||
|
|
||||||
'disableTelemetryProvider',
|
'disableTelemetryProvider',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
|
|
||||||
...(getGlobalPref(GlobalPref.REMOTE_PLAY_ENABLED) ? [
|
...(getGlobalPref(GlobalPref.REMOTE_PLAY_ENABLED) ? [
|
||||||
'remotePlayKeepAlive',
|
|
||||||
'remotePlayDirectConnectUrl',
|
'remotePlayDirectConnectUrl',
|
||||||
|
'remotePlayKeepAlive',
|
||||||
|
'remotePlayWebTitle',
|
||||||
'remotePlayDisableAchievementToast',
|
'remotePlayDisableAchievementToast',
|
||||||
'remotePlayRecentlyUsedTitleIds',
|
'remotePlayRecentlyUsedTitleIds',
|
||||||
'remotePlayWebTitle',
|
|
||||||
STATES.userAgent.capabilities.touch && 'patchUpdateInputConfigurationAsync',
|
STATES.userAgent.capabilities.touch && 'patchUpdateInputConfigurationAsync',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
|
|
||||||
...(BX_FLAGS.EnableXcloudLogging ? [
|
...(BX_FLAGS.EnableXcloudLogging ? [
|
||||||
'enableConsoleLogging',
|
'enableConsoleLogging',
|
||||||
'enableXcloudLogger',
|
'enableXcloudLogger',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const hideSections = getGlobalPref(GlobalPref.UI_HIDE_SECTIONS);
|
const hideSections = getGlobalPref(GlobalPref.UI_HIDE_SECTIONS);
|
||||||
let HOME_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
let HOME_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
hideSections.includes(UiSection.NEWS) && 'ignoreNewsSection',
|
|
||||||
(getGlobalPref(GlobalPref.BLOCK_FEATURES).includes(BlockFeature.FRIENDS) || hideSections.includes(UiSection.FRIENDS)) && 'ignorePlayWithFriendsSection',
|
|
||||||
hideSections.includes(UiSection.ALL_GAMES) && 'ignoreAllGamesSection',
|
|
||||||
hideSections.includes(UiSection.GENRES) && 'ignoreGenresSection',
|
hideSections.includes(UiSection.GENRES) && 'ignoreGenresSection',
|
||||||
!getGlobalPref(GlobalPref.BLOCK_FEATURES).includes(BlockFeature.BYOG) && hideSections.includes(UiSection.BOYG) && 'ignoreByogSection',
|
!getGlobalPref(GlobalPref.BLOCK_FEATURES).includes(BlockFeature.BYOG) && hideSections.includes(UiSection.BOYG) && 'ignoreByogSection',
|
||||||
|
|
||||||
STATES.browser.capabilities.touch && hideSections.includes(UiSection.TOUCH) && 'ignorePlayWithTouchSection',
|
STATES.browser.capabilities.touch && hideSections.includes(UiSection.TOUCH) && 'ignorePlayWithTouchSection',
|
||||||
|
|
||||||
|
getGlobalPref(GlobalPref.UI_IMAGE_QUALITY) < 90 && 'setBackgroundImageQuality',
|
||||||
|
|
||||||
hideSections.some(value => [UiSection.NATIVE_MKB, UiSection.MOST_POPULAR].includes(value)) && 'ignoreSiglSections',
|
hideSections.some(value => [UiSection.NATIVE_MKB, UiSection.MOST_POPULAR].includes(value)) && 'ignoreSiglSections',
|
||||||
|
|
||||||
...(getGlobalPref(GlobalPref.UI_IMAGE_QUALITY) < 90 ? [
|
hideSections.includes(UiSection.NEWS) && 'ignoreNewsSection',
|
||||||
'setBackgroundImageQuality',
|
(getGlobalPref(GlobalPref.BLOCK_FEATURES).includes(BlockFeature.FRIENDS) || hideSections.includes(UiSection.FRIENDS)) && 'ignorePlayWithFriendsSection',
|
||||||
] : []),
|
hideSections.includes(UiSection.ALL_GAMES) && 'ignoreAllGamesSection',
|
||||||
|
|
||||||
...(blockSomeNotifications() ? [
|
...(blockSomeNotifications() ? [
|
||||||
'changeNotificationsSubscription',
|
'changeNotificationsSubscription',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Only when playing
|
// Only when playing
|
||||||
@ -1335,7 +1365,7 @@ let STREAM_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
|||||||
(getGlobalPref(GlobalPref.TOUCH_CONTROLLER_MODE) === TouchControllerMode.OFF || getGlobalPref(GlobalPref.TOUCH_CONTROLLER_AUTO_OFF)) && 'disableTakRenderer',
|
(getGlobalPref(GlobalPref.TOUCH_CONTROLLER_MODE) === TouchControllerMode.OFF || getGlobalPref(GlobalPref.TOUCH_CONTROLLER_AUTO_OFF)) && 'disableTakRenderer',
|
||||||
getGlobalPref(GlobalPref.TOUCH_CONTROLLER_DEFAULT_OPACITY) !== 100 && 'patchTouchControlDefaultOpacity',
|
getGlobalPref(GlobalPref.TOUCH_CONTROLLER_DEFAULT_OPACITY) !== 100 && 'patchTouchControlDefaultOpacity',
|
||||||
(getGlobalPref(GlobalPref.TOUCH_CONTROLLER_MODE) !== TouchControllerMode.OFF && (getGlobalPref(GlobalPref.MKB_ENABLED) || getGlobalPref(GlobalPref.NATIVE_MKB_MODE) === NativeMkbMode.ON)) && 'patchBabylonRendererClass',
|
(getGlobalPref(GlobalPref.TOUCH_CONTROLLER_MODE) !== TouchControllerMode.OFF && (getGlobalPref(GlobalPref.MKB_ENABLED) || getGlobalPref(GlobalPref.NATIVE_MKB_MODE) === NativeMkbMode.ON)) && 'patchBabylonRendererClass',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
|
|
||||||
BX_FLAGS.EnableXcloudLogging && 'enableConsoleLogging',
|
BX_FLAGS.EnableXcloudLogging && 'enableConsoleLogging',
|
||||||
|
|
||||||
@ -1346,13 +1376,13 @@ let STREAM_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
|||||||
...(getGlobalPref(GlobalPref.REMOTE_PLAY_ENABLED) ? [
|
...(getGlobalPref(GlobalPref.REMOTE_PLAY_ENABLED) ? [
|
||||||
'patchRemotePlayMkb',
|
'patchRemotePlayMkb',
|
||||||
'remotePlayConnectMode',
|
'remotePlayConnectMode',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
|
|
||||||
// Native MKB
|
// Native MKB
|
||||||
...(AppInterface && getGlobalPref(GlobalPref.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
...(AppInterface && getGlobalPref(GlobalPref.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
||||||
'patchMouseAndKeyboardEnabled',
|
'patchMouseAndKeyboardEnabled',
|
||||||
'disableNativeRequestPointerLock',
|
'disableNativeRequestPointerLock',
|
||||||
] : []),
|
] : []) as PatchArray,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let PRODUCT_DETAIL_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
let PRODUCT_DETAIL_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
|
@ -7,7 +7,7 @@ import type { SpeakerState } from "@/modules/shortcuts/sound-shortcut";
|
|||||||
|
|
||||||
type EventCallback<T = any> = (payload: T) => void;
|
type EventCallback<T = any> = (payload: T) => void;
|
||||||
|
|
||||||
type ScriptEvents = {
|
export type ScriptEvents = {
|
||||||
'xcloud.server': {
|
'xcloud.server': {
|
||||||
status: 'ready' | 'unavailable' | 'signed-out',
|
status: 'ready' | 'unavailable' | 'signed-out',
|
||||||
};
|
};
|
||||||
@ -44,7 +44,7 @@ type ScriptEvents = {
|
|||||||
'ui.guideAchievementDetail.rendered': {},
|
'ui.guideAchievementDetail.rendered': {},
|
||||||
};
|
};
|
||||||
|
|
||||||
type StreamEvents = {
|
export type StreamEvents = {
|
||||||
'state.loading': {};
|
'state.loading': {};
|
||||||
'state.starting': {};
|
'state.starting': {};
|
||||||
'state.playing': { $video?: HTMLVideoElement };
|
'state.playing': { $video?: HTMLVideoElement };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user