mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Fix disabling touch control doesn't always work
This commit is contained in:
parent
3d2b887859
commit
8b56ae218d
@ -392,9 +392,11 @@ if (window.BX_EXPOSED.stopTakRendering) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let remotePlayCode = '';
|
let autoOffCode = '';
|
||||||
if (getPref(PrefKey.STREAM_TOUCH_CONTROLLER) !== 'off' && getPref(PrefKey.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) {
|
if (getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === 'off') {
|
||||||
remotePlayCode = `
|
autoOffCode = 'return;';
|
||||||
|
} else if (getPref(PrefKey.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) {
|
||||||
|
autoOffCode = `
|
||||||
const gamepads = window.navigator.getGamepads();
|
const gamepads = window.navigator.getGamepads();
|
||||||
let gamepadFound = false;
|
let gamepadFound = false;
|
||||||
|
|
||||||
@ -412,13 +414,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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user