Fix "disableGamepadDisconnectedScreen" patch

This commit is contained in:
redphx
2025-05-29 20:51:30 +07:00
parent c2f9f129d0
commit e276d9a2b9
3 changed files with 10 additions and 5 deletions

View File

@@ -5256,8 +5256,9 @@ logFunc(logTag, '//', logMessage);
disableGamepadDisconnectedScreen(str) {
let index = str.indexOf('"GamepadDisconnected_Title",');
if (index < 0) return !1;
let constIndex = str.indexOf("const", index - 30);
return str = str.substring(0, constIndex) + "e.onClose();return null;" + str.substring(constIndex), str;
let constIndex = PatcherUtils.lastIndexOf(str, "const[", index, 100);
if (constIndex < 0) return !1;
return str = PatcherUtils.insertAt(str, constIndex, "debugger;e();return null;"), console.log(str), str;
},
patchUpdateInputConfigurationAsync(str) {
let text = "async updateInputConfigurationAsync(e){";