mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-03 06:07:19 +02:00
Disable absolute mouse in Android app
This commit is contained in:
parent
4062852904
commit
da362325f2
10
dist/better-xcloud.user.js
vendored
10
dist/better-xcloud.user.js
vendored
@ -4545,6 +4545,11 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
},
|
||||
streamPageBeforeLoad(str) {
|
||||
return PatcherUtils.patchBeforePageLoad(str, "stream");
|
||||
},
|
||||
disableAbsoluteMouse(str) {
|
||||
let text = "sendAbsoluteMouseCapableMessage(e){";
|
||||
if (!str.includes(text)) return !1;
|
||||
return str = str.replace(text, text + "return;"), str;
|
||||
}
|
||||
}, PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||
...getPref("nativeMkb.mode") === "on" ? [
|
||||
@ -4621,9 +4626,10 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
"patchRemotePlayMkb",
|
||||
"remotePlayConnectMode"
|
||||
] : [],
|
||||
...getPref("nativeMkb.mode") === "on" ? [
|
||||
...AppInterface && getPref("nativeMkb.mode") === "on" ? [
|
||||
"patchMouseAndKeyboardEnabled",
|
||||
"disableNativeRequestPointerLock"
|
||||
"disableNativeRequestPointerLock",
|
||||
"disableAbsoluteMouse"
|
||||
] : []
|
||||
]), PRODUCT_DETAIL_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||
AppInterface && "detectProductDetailPage"
|
||||
|
@ -947,6 +947,16 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
streamPageBeforeLoad(str: string) {
|
||||
return PatcherUtils.patchBeforePageLoad(str, 'stream');
|
||||
},
|
||||
|
||||
disableAbsoluteMouse(str: string) {
|
||||
let text = 'sendAbsoluteMouseCapableMessage(e){';
|
||||
if (!str.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
str = str.replace(text, text + 'return;');
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
let PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||
@ -1062,9 +1072,10 @@ let STREAM_PAGE_PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||
] : []),
|
||||
|
||||
// Native MKB
|
||||
...(getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
||||
...(AppInterface && getPref<NativeMkbMode>(PrefKey.NATIVE_MKB_MODE) === NativeMkbMode.ON ? [
|
||||
'patchMouseAndKeyboardEnabled',
|
||||
'disableNativeRequestPointerLock',
|
||||
'disableAbsoluteMouse',
|
||||
] : []),
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user