Detach VIRTUAL_GAMEPAD_ID from EmulatedMkbHandler

This commit is contained in:
redphx
2024-10-01 17:22:33 +07:00
parent 12d8d766dc
commit 8f6bc5cb1b
8 changed files with 1109 additions and 1413 deletions

View File

@@ -1,4 +1,4 @@
import { EmulatedMkbHandler } from "@modules/mkb/mkb-handler";
import { VIRTUAL_GAMEPAD_ID } from "@modules/mkb/mkb-handler";
import { t } from "@utils/translation";
import { Toast } from "@utils/toast";
import { BxLogger } from "@utils/bx-logger";
@@ -8,7 +8,7 @@ import { getPref } from "./settings-storages/global-settings-storage";
// Show a toast when connecting/disconecting controller
export function showGamepadToast(gamepad: Gamepad) {
// Don't show Toast for virtual controller
if (gamepad.id === EmulatedMkbHandler.VIRTUAL_GAMEPAD_ID) {
if (gamepad.id === VIRTUAL_GAMEPAD_ID) {
return;
}

View File

@@ -1,5 +1,3 @@
import { isFullVersion } from "@macros/build" with {type: "macro"};
import { TouchController } from "@/modules/touch-controller";
import { BxEvent } from "./bx-event";
import { SupportedInputType } from "./bx-exposed";