mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix applying "disableAbsoluteMouse" patch in the wrong place
This commit is contained in:
parent
da362325f2
commit
3864457a07
2
dist/better-xcloud.lite.user.js
vendored
2
dist/better-xcloud.lite.user.js
vendored
@ -2771,7 +2771,7 @@ class NativeMkbHandler extends MkbHandler {
|
|||||||
this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0);
|
this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0);
|
||||||
}
|
}
|
||||||
destroy() {
|
destroy() {
|
||||||
this.pointerClient?.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), this.waitForMouseData(!1);
|
this.pointerClient?.stop(), this.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), this.waitForMouseData(!1), document.pointerLockElement && document.exitPointerLock();
|
||||||
}
|
}
|
||||||
handleMouseMove(data) {
|
handleMouseMove(data) {
|
||||||
this.sendMouseInput({
|
this.sendMouseInput({
|
||||||
|
10
dist/better-xcloud.user.js
vendored
10
dist/better-xcloud.user.js
vendored
@ -2886,7 +2886,7 @@ class NativeMkbHandler extends MkbHandler {
|
|||||||
this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0);
|
this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0);
|
||||||
}
|
}
|
||||||
destroy() {
|
destroy() {
|
||||||
this.pointerClient?.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), this.waitForMouseData(!1);
|
this.pointerClient?.stop(), this.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), this.waitForMouseData(!1), document.pointerLockElement && document.exitPointerLock();
|
||||||
}
|
}
|
||||||
handleMouseMove(data) {
|
handleMouseMove(data) {
|
||||||
this.sendMouseInput({
|
this.sendMouseInput({
|
||||||
@ -4552,9 +4552,10 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
return str = str.replace(text, text + "return;"), str;
|
return str = str.replace(text, text + "return;"), str;
|
||||||
}
|
}
|
||||||
}, PATCH_ORDERS = PatcherUtils.filterPatches([
|
}, PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
...getPref("nativeMkb.mode") === "on" ? [
|
...AppInterface && getPref("nativeMkb.mode") === "on" ? [
|
||||||
"enableNativeMkb",
|
"enableNativeMkb",
|
||||||
"exposeInputSink"
|
"exposeInputSink",
|
||||||
|
"disableAbsoluteMouse"
|
||||||
] : [],
|
] : [],
|
||||||
"modifyPreloadedState",
|
"modifyPreloadedState",
|
||||||
"optimizeGameSlugGenerator",
|
"optimizeGameSlugGenerator",
|
||||||
@ -4628,8 +4629,7 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
] : [],
|
] : [],
|
||||||
...AppInterface && getPref("nativeMkb.mode") === "on" ? [
|
...AppInterface && getPref("nativeMkb.mode") === "on" ? [
|
||||||
"patchMouseAndKeyboardEnabled",
|
"patchMouseAndKeyboardEnabled",
|
||||||
"disableNativeRequestPointerLock",
|
"disableNativeRequestPointerLock"
|
||||||
"disableAbsoluteMouse"
|
|
||||||
] : []
|
] : []
|
||||||
]), PRODUCT_DETAIL_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
]), PRODUCT_DETAIL_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
AppInterface && "detectProductDetailPage"
|
AppInterface && "detectProductDetailPage"
|
||||||
|
@ -195,6 +195,8 @@ export class NativeMkbHandler extends MkbHandler {
|
|||||||
|
|
||||||
destroy(): void {
|
destroy(): void {
|
||||||
this.pointerClient?.stop();
|
this.pointerClient?.stop();
|
||||||
|
this.stop();
|
||||||
|
|
||||||
window.removeEventListener('keyup', this);
|
window.removeEventListener('keyup', this);
|
||||||
|
|
||||||
window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this);
|
window.removeEventListener(BxEvent.XCLOUD_DIALOG_SHOWN, this);
|
||||||
@ -203,6 +205,7 @@ export class NativeMkbHandler extends MkbHandler {
|
|||||||
window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this);
|
window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this);
|
||||||
|
|
||||||
this.waitForMouseData(false);
|
this.waitForMouseData(false);
|
||||||
|
document.pointerLockElement && document.exitPointerLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseMove(data: MkbMouseMove): void {
|
handleMouseMove(data: MkbMouseMove): void {
|
||||||
|
@ -960,9 +960,10 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let PATCH_ORDERS = PatcherUtils.filterPatches([
|
let PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||||
...(getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
...(AppInterface && getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
||||||
'enableNativeMkb',
|
'enableNativeMkb',
|
||||||
'exposeInputSink',
|
'exposeInputSink',
|
||||||
|
'disableAbsoluteMouse',
|
||||||
] : []),
|
] : []),
|
||||||
|
|
||||||
'modifyPreloadedState',
|
'modifyPreloadedState',
|
||||||
@ -1075,7 +1076,6 @@ let STREAM_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
|||||||
...(AppInterface && getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
...(AppInterface && getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
||||||
'patchMouseAndKeyboardEnabled',
|
'patchMouseAndKeyboardEnabled',
|
||||||
'disableNativeRequestPointerLock',
|
'disableNativeRequestPointerLock',
|
||||||
'disableAbsoluteMouse',
|
|
||||||
] : []),
|
] : []),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user