Improve ROM loading UX (#1105)

Make cores that require threads only available if threads are enabled
Make ROMs whose extensions are the name of a core use that core
This commit is contained in:
298A-E9E3 2025-10-13 19:00:18 -04:00 committed by GitHub
parent 8184ba800b
commit 54d7dfbc1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -205,9 +205,19 @@
"Commodore VIC20": "vice_xvic",
"Commodore Plus/4": "vice_xplus4",
"Commodore PET": "vice_xpet",
"DOSBOX-PURE": "dosbox_pure"
}
if (enableThreads) {
coreValues["DOSBOX-PURE"] = "dosbox_pure";
coreValues["PlayStation Portable"] = "ppsspp";
}
for (let core in coreValues) {
if (core.toLowerCase() === ext) {
resolve(core)
}
}
const cores = Object.keys(coreValues).sort().reduce(
(obj, key) => {
obj[key] = coreValues[key];