style: 💩 remove useless config
This commit is contained in:
parent
e7c6ed1abe
commit
c9e2e5b25d
46
src/main.ts
46
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user