mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-19 18:36:25 +00:00
Support File objects (#873)
Some checks failed
Make Latest Folder On EmulatorJS CDN / run (push) Has been cancelled
Some checks failed
Make Latest Folder On EmulatorJS CDN / run (push) Has been cancelled
This commit is contained in:
parent
469b9fcc4e
commit
83768b6804
2 changed files with 13 additions and 5 deletions
|
@ -696,7 +696,9 @@ class EmulatorJS {
|
||||||
this.startGameError(this.localization('Network Error'));
|
this.startGameError(this.localization('Network Error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.toData(this.config.gamePatchUrl, true)) {
|
if (this.config.gamePatchUrl instanceof File) {
|
||||||
|
this.config.gamePatchUrl = this.config.gamePatchUrl.name;
|
||||||
|
} else if (this.toData(this.config.gamePatchUrl, true)) {
|
||||||
this.config.gamePatchUrl = "game";
|
this.config.gamePatchUrl = "game";
|
||||||
}
|
}
|
||||||
gotData(res.data);
|
gotData(res.data);
|
||||||
|
@ -746,7 +748,9 @@ class EmulatorJS {
|
||||||
this.startGameError(this.localization('Network Error'));
|
this.startGameError(this.localization('Network Error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.toData(this.config.gameParentUrl, true)) {
|
if (this.config.gameParentUrl instanceof File) {
|
||||||
|
this.config.gameParentUrl = this.config.gameParentUrl.name;
|
||||||
|
} else if (this.toData(this.config.gameParentUrl, true)) {
|
||||||
this.config.gameParentUrl = "game";
|
this.config.gameParentUrl = "game";
|
||||||
}
|
}
|
||||||
gotData(res.data);
|
gotData(res.data);
|
||||||
|
@ -800,7 +804,9 @@ class EmulatorJS {
|
||||||
this.startGameError(this.localization('Network Error'));
|
this.startGameError(this.localization('Network Error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.toData(this.config.biosUrl, true)) {
|
if (this.config.biosUrl instanceof File) {
|
||||||
|
this.config.biosUrl = this.config.biosUrl.name;
|
||||||
|
} else if (this.toData(this.config.biosUrl, true)) {
|
||||||
this.config.biosUrl = "game";
|
this.config.biosUrl = "game";
|
||||||
}
|
}
|
||||||
gotBios(res.data);
|
gotBios(res.data);
|
||||||
|
@ -935,7 +941,9 @@ class EmulatorJS {
|
||||||
this.startGameError(this.localization('Network Error'));
|
this.startGameError(this.localization('Network Error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.toData(this.config.gameUrl, true)) {
|
if (this.config.gameUrl instanceof File) {
|
||||||
|
this.config.gameUrl = this.config.gameUrl.name;
|
||||||
|
} else if (this.toData(this.config.gameUrl, true)) {
|
||||||
this.config.gameUrl = "game";
|
this.config.gameUrl = "game";
|
||||||
}
|
}
|
||||||
gotGameData(res.data);
|
gotGameData(res.data);
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
input.onchange = async () => {
|
input.onchange = async () => {
|
||||||
const url = new Blob([input.files[0]])
|
const url = input.files[0]
|
||||||
const parts = input.files[0].name.split(".")
|
const parts = input.files[0].name.split(".")
|
||||||
|
|
||||||
const core = await (async (ext) => {
|
const core = await (async (ext) => {
|
||||||
|
|
Loading…
Reference in a new issue