mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Compare commits
No commits in common. "469b9fcc4e4bed2301115556d51117e68e97e934" and "2630f81899deb5613f82f11b88ccf5faf9bcd123" have entirely different histories.
469b9fcc4e
...
2630f81899
3 changed files with 14 additions and 24 deletions
|
@ -31,6 +31,9 @@ class EJS_GameManager {
|
|||
getFrameNum: this.Module.cwrap('get_current_frame_count', 'number', ['']),
|
||||
setVSync: this.Module.cwrap('set_vsync', 'null', ['number'])
|
||||
}
|
||||
this.writeFile("/home/web_user/retroarch/userdata/config/Beetle PSX HW/Beetle PSX HW.opt", 'beetle_psx_hw_renderer = "software"\n');
|
||||
this.writeFile("/home/web_user/retroarch/userdata/config/MAME 2003 (0.78)/MAME 2003 (0.78).opt", 'mame2003_skip_disclaimer = "enabled"\nmame2003_skip_warnings = "enabled"\n');
|
||||
|
||||
this.mkdir("/data");
|
||||
this.mkdir("/data/saves");
|
||||
|
||||
|
@ -39,7 +42,6 @@ class EJS_GameManager {
|
|||
this.FS.mount(this.FS.filesystems.IDBFS, {autoPersist: true}, '/data/saves');
|
||||
//this.FS.syncfs(true, () => {});
|
||||
|
||||
this.writeConfigFile();
|
||||
this.initShaders();
|
||||
|
||||
this.EJS.on("exit", () => {
|
||||
|
@ -50,17 +52,6 @@ class EJS_GameManager {
|
|||
}, 1000);
|
||||
})
|
||||
}
|
||||
writeConfigFile() {
|
||||
if (!this.EJS.defaultCoreOpts.file || !this.EJS.defaultCoreOpts.settings) {
|
||||
return;
|
||||
}
|
||||
let output = "";
|
||||
for (const k in this.EJS.defaultCoreOpts.settings) {
|
||||
output += k + ' = "' + this.EJS.defaultCoreOpts.settings[k] +'"\n';
|
||||
}
|
||||
|
||||
this.writeFile("/home/web_user/retroarch/userdata/config/" + this.EJS.defaultCoreOpts.file, output);
|
||||
}
|
||||
loadExternalFiles() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if (this.EJS.config.externalFiles && this.EJS.config.externalFiles.constructor.name === 'Object') {
|
||||
|
|
|
@ -210,8 +210,8 @@ class EmulatorJS {
|
|||
if (response.ok) {
|
||||
response.text().then(body => {
|
||||
let version = JSON.parse(body);
|
||||
if (this.versionAsInt(this.ejs_version) < this.versionAsInt(version.version)) {
|
||||
console.log('Using EmulatorJS version ' + this.ejs_version + ' but the newest version is ' + version.current_version + '\nopen https://github.com/EmulatorJS/EmulatorJS to update');
|
||||
if (this.versionAsInt(this.ejs_version) < this.versionAsInt(version.current_version)) {
|
||||
console.log('Using EmulatorJS version ' + this.versionAsInt(this.ejs_version) + ' but the newest version is ' + this.versionAsInt(version.current_version) + '\nopen https://github.com/EmulatorJS/EmulatorJS to update');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -496,9 +496,10 @@ class EmulatorJS {
|
|||
}, fileCbFunc);
|
||||
}
|
||||
checkCoreCompatibility(version) {
|
||||
// Leave commented until next release - this is ready to go.
|
||||
if (this.versionAsInt(version.minimumEJSVersion) > this.versionAsInt(this.ejs_version)) {
|
||||
this.startGameError(this.localization("Outdated EmulatorJS version"));
|
||||
throw new Error("Core requires minimum EmulatorJS version of " + version.minimumEJSVersion);
|
||||
//this.startGameError(this.localization("Outdated EmulatorJS version"));
|
||||
//throw new Error("Core requires minimum EmulatorJS version of " + version.minimumEJSVersion);
|
||||
}
|
||||
}
|
||||
startGameError(message) {
|
||||
|
@ -521,7 +522,6 @@ class EmulatorJS {
|
|||
return;
|
||||
}
|
||||
const gotCore = (data) => {
|
||||
this.defaultCoreOpts = {};
|
||||
this.checkCompression(new Uint8Array(data), this.localization("Decompress Game Core")).then((data) => {
|
||||
let js, thread, wasm;
|
||||
for (let k in data) {
|
||||
|
@ -538,7 +538,6 @@ class EmulatorJS {
|
|||
this.extensions = core.extensions;
|
||||
this.coreName = core.name;
|
||||
this.repository = core.repo;
|
||||
this.defaultCoreOpts = core.options;
|
||||
} else if (k === "license.txt") {
|
||||
this.license = new TextDecoder().decode(data[k]);
|
||||
}
|
||||
|
@ -548,7 +547,7 @@ class EmulatorJS {
|
|||
}
|
||||
const report = "cores/reports/" + this.getCore() + ".json";
|
||||
this.downloadFile(report, (rep) => {
|
||||
if (rep === -1 || typeof report === "string") {
|
||||
if (rep === -1) {
|
||||
rep = {};
|
||||
} else {
|
||||
rep = rep.data;
|
||||
|
@ -579,7 +578,7 @@ class EmulatorJS {
|
|||
}
|
||||
return;
|
||||
}
|
||||
console.warn("File was not found locally, but was found on the emulatorjs cdn.\nIt is recommended to download the stable release from here: https://cdn.emulatorjs.org/releases/");
|
||||
console.warn("File was not found locally, but was found on the emulatorjs cdn.\nIt is recommended to download the latest release from here: https://cdn.emulatorjs.org/releases/");
|
||||
gotCore(res.data);
|
||||
this.storage.core.put(filename, {
|
||||
version: rep.buildStart,
|
||||
|
@ -1625,7 +1624,7 @@ class EmulatorJS {
|
|||
this.gameManager.toggleMainLoop(this.paused ? 0 : 1);
|
||||
|
||||
//I now realize its not easy to pause it while the cursor is locked, just in case I guess
|
||||
if (this.defaultCoreOpts.supportsMouse) {
|
||||
if (this.getCore(true) === "nds") {
|
||||
if (this.canvas.exitPointerLock) {
|
||||
this.canvas.exitPointerLock();
|
||||
} else if (this.canvas.mozExitPointerLock) {
|
||||
|
@ -1851,7 +1850,7 @@ class EmulatorJS {
|
|||
|
||||
this.addEventListener(this.canvas, "click", (e) => {
|
||||
if (e.pointerType === "touch") return;
|
||||
if (this.defaultCoreOpts.supportsMouse && !this.paused) {
|
||||
if (this.getCore(true) === "nds" && !this.paused) {
|
||||
if (this.canvas.requestPointerLock) {
|
||||
this.canvas.requestPointerLock();
|
||||
} else if (this.canvas.mozRequestPointerLock) {
|
||||
|
@ -1884,7 +1883,7 @@ class EmulatorJS {
|
|||
enter.style.display = "none";
|
||||
if (this.isMobile) {
|
||||
try {
|
||||
screen.orientation.lock(this.getCore(true) === "nds" ? "portrait" : "landscape").catch(e => {});
|
||||
screen.orientation.lock(this.getCore(true) === "nds" ? "portrait" : "landscape").catch(e => {});;
|
||||
} catch(e) {}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1 +1 @@
|
|||
{ "readme": "CURRENT_VERSION IS NO LONGER UPDATED. USE VERION", "current_version": 999999, "version": "4.0.12" }
|
||||
{ "current_version": "4.0.12" }
|
||||
|
|
Loading…
Reference in a new issue