Update better-xcloud.user.js

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

View File

@ -4868,7 +4868,7 @@ class Preferences {
}, },
[PrefKey.BITRATE_VIDEO_MAX]: { [PrefKey.BITRATE_VIDEO_MAX]: {
type: SettingElementType.NUMBER_STEPPER, type: SettingElementType.NUMBER_STEPPER,
label: "Maximum video bitrate", label: t("bitrate-video-maximum"),
note: "⚠️ " + t("unexpected-behavior"), note: "⚠️ " + t("unexpected-behavior"),
default: 0, default: 0,
min: 0, min: 0,
@ -7757,7 +7757,7 @@ class XhomeInterceptor {
let hasTouchSupport2 = inputConfigs.supportedTabs.length > 0; let hasTouchSupport2 = inputConfigs.supportedTabs.length > 0;
if (!hasTouchSupport2) { if (!hasTouchSupport2) {
const supportedInputTypes = inputConfigs.supportedInputTypes; const supportedInputTypes = inputConfigs.supportedInputTypes;
hasTouchSupport2 = supportedInputTypes.includes("NativeTouch"); hasTouchSupport2 = supportedInputTypes.includes(InputType.NATIVE_TOUCH) || supportedInputTypes.includes(InputType.CUSTOM_TOUCH_OVERLAY);
} }
if (hasTouchSupport2) { if (hasTouchSupport2) {
TouchController.disable(); TouchController.disable();
@ -7943,6 +7943,13 @@ class XcloudInterceptor {
let overrides = JSON.parse(obj.clientStreamingConfigOverrides || "{}") || {}; let overrides = JSON.parse(obj.clientStreamingConfigOverrides || "{}") || {};
overrides.inputConfiguration = overrides.inputConfiguration || {}; overrides.inputConfiguration = overrides.inputConfiguration || {};
overrides.inputConfiguration.enableVibration = true; 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 = overrides.videoConfiguration || {};
overrides.videoConfiguration.setCodecPreferences = true; overrides.videoConfiguration.setCodecPreferences = true;
if (TouchController.isEnabled()) { if (TouchController.isEnabled()) {