mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 21:28:27 +02:00
Add native MKB support for Android app
This commit is contained in:
@@ -2,7 +2,6 @@ import { ControllerShortcut } from "@/modules/controller-shortcut";
|
||||
import { BxEvent } from "@utils/bx-event";
|
||||
import { STATES } from "@utils/global";
|
||||
import { getPref, PrefKey } from "@utils/preferences";
|
||||
import { UserAgent } from "@utils/user-agent";
|
||||
import { BxLogger } from "./bx-logger";
|
||||
import { BX_FLAGS } from "./bx-flags";
|
||||
|
||||
@@ -24,13 +23,15 @@ export const BxExposed = {
|
||||
|
||||
let supportedInputTypes = titleInfo.details.supportedInputTypes;
|
||||
|
||||
// Remove native MKB support on mobile browsers or by user's choice
|
||||
if (getPref(PrefKey.NATIVE_MKB_DISABLED) || UserAgent.isMobile()) {
|
||||
supportedInputTypes = supportedInputTypes.filter(i => i !== InputType.MKB);
|
||||
} else if (BX_FLAGS.ForceNativeMkbTitles.includes(titleInfo.details.productId)) {
|
||||
if (BX_FLAGS.ForceNativeMkbTitles.includes(titleInfo.details.productId)) {
|
||||
supportedInputTypes.push(InputType.MKB);
|
||||
}
|
||||
|
||||
// Remove native MKB support on mobile browsers or by user's choice
|
||||
if (getPref(PrefKey.NATIVE_MKB_ENABLED) === 'off') {
|
||||
supportedInputTypes = supportedInputTypes.filter(i => i !== InputType.MKB);
|
||||
}
|
||||
|
||||
titleInfo.details.hasMkbSupport = supportedInputTypes.includes(InputType.MKB);
|
||||
|
||||
if (STATES.hasTouchSupport) {
|
||||
|
Reference in New Issue
Block a user