From cec2bdf80772c30d325ee234528954e8a8410811 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sun, 12 May 2024 08:07:35 +0700 Subject: [PATCH] Fix emulated MKB not being disabled on native MKB games (#391) --- src/utils/bx-exposed.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/bx-exposed.ts b/src/utils/bx-exposed.ts index 5f76064..95debf7 100644 --- a/src/utils/bx-exposed.ts +++ b/src/utils/bx-exposed.ts @@ -37,9 +37,11 @@ export const BxExposed = { // Clone the object since the original is read-only titleInfo = structuredClone(titleInfo); + let supportedInputTypes = titleInfo.details.supportedInputTypes; + titleInfo.details.hasMkbSupport = supportedInputTypes.includes(InputType.MKB); + if (STATES.hasTouchSupport) { let touchControllerAvailability = getPref(PrefKey.STREAM_TOUCH_CONTROLLER); - let supportedInputTypes = titleInfo.details.supportedInputTypes; // Disable touch control when gamepad found if (touchControllerAvailability !== 'off' && getPref(PrefKey.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) { @@ -67,7 +69,6 @@ export const BxExposed = { } // Pre-check supported input types - titleInfo.details.hasMkbSupport = supportedInputTypes.includes(InputType.MKB); titleInfo.details.hasTouchSupport = supportedInputTypes.includes(InputType.NATIVE_TOUCH) || supportedInputTypes.includes(InputType.CUSTOM_TOUCH_OVERLAY) || supportedInputTypes.includes(InputType.GENERIC_TOUCH);