Fix not fully disable native MKB

This commit is contained in:
redphx 2024-05-18 16:00:13 +07:00
parent e52a296872
commit 47078da413

View File

@ -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;