mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-19 18:36:25 +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) {
|
||||
console.log(e, fileNames);
|
||||
if (fileNames.length > 1) {
|
||||
console.warn("Could not auto-create cue file(s).");
|
||||
return null;
|
||||
|
@ -193,11 +192,9 @@ class EJS_GameManager {
|
|||
console.warn("Could not auto-create cue file(s).");
|
||||
return null;
|
||||
}
|
||||
console.log(fileNames);
|
||||
let baseFileName = fileNames[0].split("/").pop();
|
||||
if (baseFileName.includes(".")) {
|
||||
baseFileName = baseFileName.substring(0, baseFileName.length - baseFileName.split(".").pop().length - 1);
|
||||
console.log(baseFileName);
|
||||
}
|
||||
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";
|
||||
|
|
|
@ -2634,21 +2634,24 @@ class EmulatorJS {
|
|||
this.virtualGamepad.style.display = "none";
|
||||
}
|
||||
handleResize() {
|
||||
if (this.virtualGamepad) {
|
||||
if (this.virtualGamepad.style.display === "none") {
|
||||
this.virtualGamepad.style.opacity = 0;
|
||||
this.virtualGamepad.style.display = "";
|
||||
setTimeout(() => {
|
||||
this.virtualGamepad.style.display = "none";
|
||||
this.virtualGamepad.style.opacity = "";
|
||||
}, 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();
|
||||
if (this.virtualGamepad.style.display === "none") {
|
||||
this.virtualGamepad.style.opacity = 0;
|
||||
this.virtualGamepad.style.display = "";
|
||||
setTimeout(() => {
|
||||
this.virtualGamepad.style.display = "none";
|
||||
this.virtualGamepad.style.opacity = "";
|
||||
}, 250)
|
||||
}
|
||||
}
|
||||
getElementSize(element) {
|
||||
let elem = element.cloneNode(true);
|
||||
|
|
Loading…
Reference in a new issue