mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Fix local co-op not working
This commit is contained in:
parent
ba0abaa2f5
commit
e2806fea68
12
dist/better-xcloud.user.js
vendored
12
dist/better-xcloud.user.js
vendored
@ -9258,14 +9258,14 @@ eval(\`this.onGamepadChanged = function \${onGamepadChangedStr}\`);
|
|||||||
|
|
||||||
let onGamepadInputStr = this.onGamepadInput.toString();
|
let onGamepadInputStr = this.onGamepadInput.toString();
|
||||||
|
|
||||||
match = onGamepadInputStr.match(/(w+.GamepadIndex)/);
|
match = onGamepadInputStr.match(/(\\w+\\.GamepadIndex)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
const gamepadIndexVar = match[0];
|
const gamepadIndexVar = match[0];
|
||||||
onGamepadInputStr = onGamepadInputStr.replace('this.gamepadStates.get(', \`this.gamepadStates.get(\${gamepadIndexVar},\`);
|
onGamepadInputStr = onGamepadInputStr.replace('this.gamepadStates.get(', \`this.gamepadStates.get(\${gamepadIndexVar},\`);
|
||||||
eval(\`this.onGamepadInput = function \${onGamepadInputStr}\`);
|
eval(\`this.onGamepadInput = function \${onGamepadInputStr}\`);
|
||||||
console.log('[Better xCloud] ✅ Successfully patched local co-op support');
|
console.log('[Better xCloud] ✅ Successfully patched local co-op support');
|
||||||
} else {
|
} else {
|
||||||
console.log('[Better xCloud] ❌ Unable to patch local co-op support');
|
console.log('[Better xCloud] ❌ Unable to patch local co-op support');
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
const newCode = `true; ${patchstr}; true,`;
|
const newCode = `true; ${patchstr}; true,`;
|
||||||
|
@ -288,14 +288,14 @@ eval(\`this.onGamepadChanged = function \${onGamepadChangedStr}\`);
|
|||||||
|
|
||||||
let onGamepadInputStr = this.onGamepadInput.toString();
|
let onGamepadInputStr = this.onGamepadInput.toString();
|
||||||
|
|
||||||
match = onGamepadInputStr.match(/(\w+\.GamepadIndex)/);
|
match = onGamepadInputStr.match(/(\\w+\\.GamepadIndex)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
const gamepadIndexVar = match[0];
|
const gamepadIndexVar = match[0];
|
||||||
onGamepadInputStr = onGamepadInputStr.replace('this.gamepadStates.get(', \`this.gamepadStates.get(\${gamepadIndexVar},\`);
|
onGamepadInputStr = onGamepadInputStr.replace('this.gamepadStates.get(', \`this.gamepadStates.get(\${gamepadIndexVar},\`);
|
||||||
eval(\`this.onGamepadInput = function \${onGamepadInputStr}\`);
|
eval(\`this.onGamepadInput = function \${onGamepadInputStr}\`);
|
||||||
console.log('[Better xCloud] ✅ Successfully patched local co-op support');
|
console.log('[Better xCloud] ✅ Successfully patched local co-op support');
|
||||||
} else {
|
} else {
|
||||||
console.log('[Better xCloud] ❌ Unable to patch local co-op support');
|
console.log('[Better xCloud] ❌ Unable to patch local co-op support');
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user