Create BxLogger to show colored logs

This commit is contained in:
redphx
2024-04-30 18:52:56 +07:00
parent 26c318fb8d
commit edc8991a6a
9 changed files with 59 additions and 15 deletions

View File

@@ -11,6 +11,9 @@ import type { MkbStoredPreset } from "../../types/mkb";
import { showStreamSettings } from "../stream/stream-ui";
import { STATES } from "../../utils/global";
import { UserAgent } from "../../utils/user-agent";
import { BxLogger } from "../../utils/bx-logger";
const LOG_TAG = 'MkbHandler';
/*
This class uses some code from Yuzu emulator to handle mouse's movements
@@ -472,7 +475,7 @@ export class MkbHandler {
getPref(PrefKey.MKB_ENABLED) && !UserAgent.isMobile() && window.addEventListener(BxEvent.STREAM_PLAYING, () => {
// Enable MKB
if (!STATES.currentStream.titleInfo?.details.hasMkbSupport) {
console.log('Emulate MKB');
BxLogger.info(LOG_TAG, 'Emulate MKB');
MkbHandler.INSTANCE.init();
}
});