From e52a296872d9ddf1bb69753119386b5ad76d981c Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sat, 18 May 2024 15:38:03 +0700 Subject: [PATCH] Minor fixes --- src/utils/bx-exposed.ts | 2 +- src/utils/network.ts | 3 ++- src/utils/preferences.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/bx-exposed.ts b/src/utils/bx-exposed.ts index 2177702..6c96149 100644 --- a/src/utils/bx-exposed.ts +++ b/src/utils/bx-exposed.ts @@ -4,7 +4,7 @@ import { STATES } from "@utils/global"; import { getPref, PrefKey } from "@utils/preferences"; import { UserAgent } from "@utils/user-agent"; -enum InputType { +export enum InputType { CONTROLLER = 'Controller', MKB = 'MKB', CUSTOM_TOUCH_OVERLAY = 'CustomTouchOverlay', diff --git a/src/utils/network.ts b/src/utils/network.ts index 01f92ca..5acb8d2 100644 --- a/src/utils/network.ts +++ b/src/utils/network.ts @@ -8,6 +8,7 @@ import { TouchController } from "@modules/touch-controller"; import { STATES } from "@utils/global"; import { getPreferredServerRegion } from "@utils/region"; import { GamePassCloudGallery } from "./gamepass-gallery"; +import { InputType } from "./bx-exposed"; export const NATIVE_FETCH = window.fetch; @@ -188,7 +189,7 @@ class XhomeInterceptor { let hasTouchSupport = inputConfigs.supportedTabs.length > 0; if (!hasTouchSupport) { const supportedInputTypes = inputConfigs.supportedInputTypes; - hasTouchSupport = supportedInputTypes.includes('NativeTouch'); + hasTouchSupport = supportedInputTypes.includes(InputType.NATIVE_TOUCH) || supportedInputTypes.includes(InputType.CUSTOM_TOUCH_OVERLAY); } if (hasTouchSupport) { diff --git a/src/utils/preferences.ts b/src/utils/preferences.ts index add1c64..5b4cd02 100644 --- a/src/utils/preferences.ts +++ b/src/utils/preferences.ts @@ -319,7 +319,7 @@ export class Preferences { [PrefKey.BITRATE_VIDEO_MAX]: { type: SettingElementType.NUMBER_STEPPER, - label: 'Maximum video bitrate', + label: t('bitrate-video-maximum'), note: '⚠️ ' + t('unexpected-behavior'), default: 0, min: 0,