From c9e2e5b25de033fdf622d11d5edb7f5a3c7d7594 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Wed, 8 Jan 2025 16:47:17 +0100 Subject: [PATCH] style: :poop: remove useless config --- src/main.ts | 46 +++------------------------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/src/main.ts b/src/main.ts index 60f1318..188c7d4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,45 +56,7 @@ type Config = { gameUrl?: string dataPath?: string system?: string - biosUrl?: string - gameName?: string - color?: string - adUrl?: string - adMode?: 0 | 1 | 2 - adTimer?: number - adSize?: string[] - alignStartButton?: 'top' | 'center' | 'bottom' - VirtualGamepadSettings?: object - buttonOpts?: { [key: string]: boolean } - volume?: number - defaultControllers?: { [key: number]: { [key: number]: string } } - startOnLoad?: boolean - fullscreenOnLoad?: boolean - filePaths?: { [key: string]: string } - loadState?: string - cacheLimit?: number - cheats?: { [key: string]: string } - defaultOptions?: { [key: string]: string } - gamePatchUrl?: string - gameParentUrl?: string - netplayUrl?: string - gameId?: number - backgroundImg?: string - backgroundBlur?: boolean - backgroundColor?: string - controlScheme?: string threads?: boolean - disableCue?: boolean - startBtnName?: string - softLoad?: number - screenRecording?: { [key: string]: number } - externalFiles?: { [key: string]: string } - disableDatabases?: boolean - disableLocalStorage?: boolean - forceLegacyCores?: boolean - noAutoFocus?: boolean - videoRotation?: 0 | 1 | 2 | 3 - shaders?: { [key: string]: string } language?: string langJson?: { [key: string]: string } } @@ -214,19 +176,17 @@ class MyEmulatorJS extends window.EmulatorJS { const config: Config = {} -if (Object.keys(localizations).includes(document.documentElement.lang)) { - config.language = document.documentElement.lang - config.langJson = localizations[document.documentElement.lang] +config.language = document.documentElement.lang +if (Object.keys(localizations).includes(config.language)) { + config.langJson = localizations[config.language] } const gameUrl = new URL(location.href).searchParams.get('file') - if (gameUrl) { config.gameUrl = gameUrl } const system = new URL(location.href).searchParams.get('core') - if (system) { config.system = system }