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 }