mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Cleanup
This commit is contained in:
parent
c01fb72883
commit
66249ba1da
2 changed files with 11 additions and 11 deletions
|
@ -177,7 +177,6 @@ class EJS_GameManager {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log(e, fileNames);
|
|
||||||
if (fileNames.length > 1) {
|
if (fileNames.length > 1) {
|
||||||
console.warn("Could not auto-create cue file(s).");
|
console.warn("Could not auto-create cue file(s).");
|
||||||
return null;
|
return null;
|
||||||
|
@ -193,11 +192,9 @@ class EJS_GameManager {
|
||||||
console.warn("Could not auto-create cue file(s).");
|
console.warn("Could not auto-create cue file(s).");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
console.log(fileNames);
|
|
||||||
let baseFileName = fileNames[0].split("/").pop();
|
let baseFileName = fileNames[0].split("/").pop();
|
||||||
if (baseFileName.includes(".")) {
|
if (baseFileName.includes(".")) {
|
||||||
baseFileName = baseFileName.substring(0, baseFileName.length - baseFileName.split(".").pop().length - 1);
|
baseFileName = baseFileName.substring(0, baseFileName.length - baseFileName.split(".").pop().length - 1);
|
||||||
console.log(baseFileName);
|
|
||||||
}
|
}
|
||||||
for (let i=0; i<fileNames.length; i++) {
|
for (let i=0; i<fileNames.length; i++) {
|
||||||
const contents = " FILE \""+fileNames[i]+"\" BINARY\n TRACK 01 MODE1/2352\n INDEX 01 00:00:00";
|
const contents = " FILE \""+fileNames[i]+"\" BINARY\n TRACK 01 MODE1/2352\n INDEX 01 00:00:00";
|
||||||
|
|
|
@ -2634,13 +2634,7 @@ class EmulatorJS {
|
||||||
this.virtualGamepad.style.display = "none";
|
this.virtualGamepad.style.display = "none";
|
||||||
}
|
}
|
||||||
handleResize() {
|
handleResize() {
|
||||||
if (!this.Module) return;
|
if (this.virtualGamepad) {
|
||||||
const dpr = window.devicePixelRatio || 1;
|
|
||||||
const positionInfo = this.elements.parent.getBoundingClientRect();
|
|
||||||
const width = positionInfo.width * dpr;
|
|
||||||
const height = (positionInfo.height * dpr);
|
|
||||||
this.Module.setCanvasSize(width, height);
|
|
||||||
this.handleSettingsResize();
|
|
||||||
if (this.virtualGamepad.style.display === "none") {
|
if (this.virtualGamepad.style.display === "none") {
|
||||||
this.virtualGamepad.style.opacity = 0;
|
this.virtualGamepad.style.opacity = 0;
|
||||||
this.virtualGamepad.style.display = "";
|
this.virtualGamepad.style.display = "";
|
||||||
|
@ -2650,6 +2644,15 @@ class EmulatorJS {
|
||||||
}, 250)
|
}, 250)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!this.Module) return;
|
||||||
|
const dpr = window.devicePixelRatio || 1;
|
||||||
|
const positionInfo = this.elements.parent.getBoundingClientRect();
|
||||||
|
const width = positionInfo.width * dpr;
|
||||||
|
const height = (positionInfo.height * dpr);
|
||||||
|
this.Module.setCanvasSize(width, height);
|
||||||
|
if (!this.handleSettingsResize) return;
|
||||||
|
this.handleSettingsResize();
|
||||||
|
}
|
||||||
getElementSize(element) {
|
getElementSize(element) {
|
||||||
let elem = element.cloneNode(true);
|
let elem = element.cloneNode(true);
|
||||||
elem.style.position = 'absolute';
|
elem.style.position = 'absolute';
|
||||||
|
|
Loading…
Reference in a new issue