style: 💩 remove useless config
All checks were successful
retro / xml (push) Successful in 19s
retro / php (push) Successful in 57s
retro / nodejs (push) Successful in 48s
retro / release (push) Has been skipped

This commit is contained in:
Michel Roux 2025-01-08 16:47:17 +01:00
parent e7c6ed1abe
commit c9e2e5b25d

View File

@ -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
}