mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Update better-xcloud.user.js
This commit is contained in:
parent
344b6bb2c9
commit
8ca6a9e08c
30
dist/better-xcloud.user.js
vendored
30
dist/better-xcloud.user.js
vendored
@ -3810,9 +3810,11 @@ if (window.BX_EXPOSED.stopTakRendering) {
|
|||||||
disableTakRenderer(str) {
|
disableTakRenderer(str) {
|
||||||
if (!str.includes("const{TakRenderer:"))
|
if (!str.includes("const{TakRenderer:"))
|
||||||
return !1;
|
return !1;
|
||||||
let remotePlayCode = "";
|
let autoOffCode = "";
|
||||||
if (getPref("stream_touch_controller") !== "off" && getPref("stream_touch_controller_auto_off"))
|
if (getPref("stream_touch_controller") === "off")
|
||||||
remotePlayCode = `
|
autoOffCode = "return;";
|
||||||
|
else if (getPref("stream_touch_controller_auto_off"))
|
||||||
|
autoOffCode = `
|
||||||
const gamepads = window.navigator.getGamepads();
|
const gamepads = window.navigator.getGamepads();
|
||||||
let gamepadFound = false;
|
let gamepadFound = false;
|
||||||
|
|
||||||
@ -3828,13 +3830,11 @@ if (gamepadFound) {
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
const newCode = `
|
const newCode = `
|
||||||
if (!!window.BX_REMOTE_PLAY_CONFIG) {
|
${autoOffCode}
|
||||||
${remotePlayCode}
|
|
||||||
} else {
|
const titleInfo = window.BX_EXPOSED.getTitleInfo();
|
||||||
const titleInfo = window.BX_EXPOSED.getTitleInfo();
|
if (titleInfo && !titleInfo.details.hasTouchSupport && !titleInfo.details.hasFakeTouchSupport) {
|
||||||
if (titleInfo && !titleInfo.details.hasTouchSupport && !titleInfo.details.hasFakeTouchSupport) {
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
return str = str.replace("const{TakRenderer:", newCode + "const{TakRenderer:"), str;
|
return str = str.replace("const{TakRenderer:", newCode + "const{TakRenderer:"), str;
|
||||||
@ -5735,7 +5735,15 @@ var BxExposed = {
|
|||||||
const navigationDialogManager = NavigationDialogManager.getInstance();
|
const navigationDialogManager = NavigationDialogManager.getInstance();
|
||||||
if (navigationDialogManager.isShowing())
|
if (navigationDialogManager.isShowing())
|
||||||
return navigationDialogManager.hide(), !0;
|
return navigationDialogManager.hide(), !0;
|
||||||
return !1;
|
const dict = {
|
||||||
|
bubbles: !0,
|
||||||
|
cancelable: !0,
|
||||||
|
key: "XF86Back",
|
||||||
|
code: "XF86Back",
|
||||||
|
keyCode: 4,
|
||||||
|
which: 4
|
||||||
|
};
|
||||||
|
return document.body.dispatchEvent(new KeyboardEvent("keydown", dict)), document.body.dispatchEvent(new KeyboardEvent("keyup", dict)), !1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user