mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Disable achievement toast in Remote Play
This commit is contained in:
parent
db1ce23b53
commit
3d3a013a5c
@ -115,6 +115,22 @@ const PATCHES = {
|
|||||||
return str.replace(text, `connectMode:window.BX_REMOTE_PLAY_CONFIG?"xhome-connect":"cloud-connect",remotePlayServerId:(window.BX_REMOTE_PLAY_CONFIG&&window.BX_REMOTE_PLAY_CONFIG.serverId)||''`);
|
return str.replace(text, `connectMode:window.BX_REMOTE_PLAY_CONFIG?"xhome-connect":"cloud-connect",remotePlayServerId:(window.BX_REMOTE_PLAY_CONFIG&&window.BX_REMOTE_PLAY_CONFIG.serverId)||''`);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Disable achievement toast in Remote Play
|
||||||
|
remotePlayDisableAchievementToast(str: string) {
|
||||||
|
const text = '.AchievementUnlock:{';
|
||||||
|
if (!str.includes(text)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newCode = `
|
||||||
|
if (!!window.BX_REMOTE_PLAY_CONFIG) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
return str.replace(text, text + newCode);
|
||||||
|
},
|
||||||
|
|
||||||
// Disable trackEvent() function
|
// Disable trackEvent() function
|
||||||
disableTrackEvent(str: string) {
|
disableTrackEvent(str: string) {
|
||||||
const text = 'this.trackEvent=';
|
const text = 'this.trackEvent=';
|
||||||
@ -467,6 +483,7 @@ let PATCH_ORDERS: PatchArray = [
|
|||||||
...(getPref(PrefKey.REMOTE_PLAY_ENABLED) ? [
|
...(getPref(PrefKey.REMOTE_PLAY_ENABLED) ? [
|
||||||
'remotePlayKeepAlive',
|
'remotePlayKeepAlive',
|
||||||
'remotePlayDirectConnectUrl',
|
'remotePlayDirectConnectUrl',
|
||||||
|
'remotePlayDisableAchievementToast',
|
||||||
STATES.hasTouchSupport && 'patchUpdateInputConfigurationAsync',
|
STATES.hasTouchSupport && 'patchUpdateInputConfigurationAsync',
|
||||||
] : []),
|
] : []),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user