Fix video scale

This commit is contained in:
Ethan O'Brien 2023-07-08 19:35:59 -05:00
parent 1c6b6d0ad1
commit c04aef77da
2 changed files with 1 additions and 12 deletions

View file

@ -53,8 +53,6 @@ class EJS_GameManager {
return "autosave_interval = 60\n" +
"screenshot_directory = /\n" +
"block_sram_overwrite = false\n" +
"video_font_enable = false\n" +
"video_scale = 1.0\n" +
"video_gpu_screenshot = false\n" +
"audio_latency = 96\n" +
"video_vsync = true\n" +

View file

@ -767,13 +767,6 @@ class EmulatorJS {
}
this.callEvent("start");
}
onResize() {
this.handleResize();
setTimeout(this.handleResize.bind(this), 50);
setTimeout(this.handleResize.bind(this), 100);
setTimeout(this.handleResize.bind(this), 500);
setTimeout(this.handleResize.bind(this), 1000);
}
bindListeners() {
this.createContextMenu();
this.createBottomMenuBar();
@ -784,7 +777,7 @@ class EmulatorJS {
this.addEventListener(this.elements.parent, "mousedown touchstart", (e) => {
if (document.activeElement !== this.elements.parent) this.elements.parent.focus();
})
this.addEventListener(window, "resize", this.onResize.bind(this));
this.addEventListener(window, "resize", this.handleResize.bind(this));
//this.addEventListener(window, "blur", e => console.log(e), true); //TODO - add "click to make keyboard keys work" message?
this.gamepad = new GamepadHandler(); //https://github.com/ethanaobrien/Gamepad
this.gamepad.on('connected', (e) => {
@ -1300,7 +1293,6 @@ class EmulatorJS {
screen.orientation.lock(this.getCore(true) === "nds" ? "portrait" : "landscape").catch(e => {});;
} catch(e) {}
}
this.onResize();
});
const exit = addButton("Exit Fullscreen", '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M215.1 272h-136c-12.94 0-24.63 7.797-29.56 19.75C45.47 303.7 48.22 317.5 57.37 326.6l30.06 30.06l-78.06 78.07c-12.5 12.5-12.5 32.75-.0012 45.25l22.62 22.62c12.5 12.5 32.76 12.5 45.26 .0013l78.06-78.07l30.06 30.06c6.125 6.125 14.31 9.367 22.63 9.367c4.125 0 8.279-.7891 12.25-2.43c11.97-4.953 19.75-16.62 19.75-29.56V296C239.1 282.7 229.3 272 215.1 272zM296 240h136c12.94 0 24.63-7.797 29.56-19.75c4.969-11.97 2.219-25.72-6.938-34.87l-30.06-30.06l78.06-78.07c12.5-12.5 12.5-32.76 .0002-45.26l-22.62-22.62c-12.5-12.5-32.76-12.5-45.26-.0003l-78.06 78.07l-30.06-30.06c-9.156-9.141-22.87-11.84-34.87-6.937c-11.97 4.953-19.75 16.62-19.75 29.56v135.1C272 229.3 282.7 240 296 240z"/></svg>', () => {
if (document.exitFullscreen) {
@ -1319,7 +1311,6 @@ class EmulatorJS {
screen.orientation.unlock();
} catch(e) {}
}
this.onResize();
});
exit.style.display = "none";