mirror of
https://github.com/alexankitty/Myrient-Search-Engine.git
synced 2026-01-15 16:33:15 -03:00
use DebugPrint
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import debugPrint from './debugprint.js'
|
||||
|
||||
// See https://emulatorjs.org/docs/systems for available cores
|
||||
const systemConfigs = {
|
||||
// Nintendo Systems
|
||||
@@ -168,24 +170,24 @@ const systemConfigs = {
|
||||
const COMPATIBLE_SYSTEMS = Object.keys(systemConfigs);
|
||||
|
||||
export function isEmulatorCompatible(category) {
|
||||
console.log(`[EmulatorConfig] Checking compatibility for: ${category}`);
|
||||
debugPrint(`[EmulatorConfig] Checking compatibility for: ${category}`);
|
||||
|
||||
if (process.env.EMULATOR_ENABLED !== 'true') {
|
||||
console.log('[EmulatorConfig] Emulator is disabled via environment variable');
|
||||
debugPrint('[EmulatorConfig] Emulator is disabled via environment variable');
|
||||
return false;
|
||||
}
|
||||
|
||||
const isCompatible = COMPATIBLE_SYSTEMS.includes(category);
|
||||
console.log(`[EmulatorConfig] System compatibility result: ${isCompatible}`);
|
||||
debugPrint(`[EmulatorConfig] System compatibility result: ${isCompatible}`);
|
||||
return isCompatible;
|
||||
}
|
||||
|
||||
export function getEmulatorConfig(category) {
|
||||
console.log(`[EmulatorConfig] Configuring emulator for category: ${category}`);
|
||||
debugPrint(`[EmulatorConfig] Configuring emulator for category: ${category}`);
|
||||
|
||||
const systemConfig = systemConfigs[category];
|
||||
if (!systemConfig) {
|
||||
console.warn(`[EmulatorConfig] No configuration found for category: ${category}`);
|
||||
debugPrint(`[EmulatorConfig] No configuration found for category: ${category}`, 'warn');
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -197,7 +199,7 @@ export function getEmulatorConfig(category) {
|
||||
bios: systemConfig.bios || null
|
||||
};
|
||||
|
||||
console.log(`[EmulatorConfig] Final configuration:`, config);
|
||||
debugPrint(`[EmulatorConfig] Final configuration:`, config);
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user