From 47078da41306856f5d48261e4df4d9d492dcbf69 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sat, 18 May 2024 16:00:13 +0700 Subject: [PATCH] Fix not fully disable native MKB --- src/utils/network.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utils/network.ts b/src/utils/network.ts index 5acb8d2..27caecf 100644 --- a/src/utils/network.ts +++ b/src/utils/network.ts @@ -9,6 +9,7 @@ import { STATES } from "@utils/global"; import { getPreferredServerRegion } from "@utils/region"; import { GamePassCloudGallery } from "./gamepass-gallery"; import { InputType } from "./bx-exposed"; +import { UserAgent } from "./user-agent"; export const NATIVE_FETCH = window.fetch; @@ -439,6 +440,14 @@ class XcloudInterceptor { overrides.inputConfiguration = overrides.inputConfiguration || {}; overrides.inputConfiguration.enableVibration = true; + if (getPref(PrefKey.NATIVE_MKB_DISABLED) || UserAgent.isMobile()) { + overrides.inputConfiguration = Object.assign(overrides.inputConfiguration, { + enableMouseInput: false, + enableAbsoluteMouse: false, + enableKeyboardInput: false, + }); + } + overrides.videoConfiguration = overrides.videoConfiguration || {}; overrides.videoConfiguration.setCodecPreferences = true;