mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Remove canvas resize call as this is now handled by the backend
This commit is contained in:
parent
84a1fc13d7
commit
b0601b6226
@ -1410,8 +1410,8 @@ class EmulatorJS {
|
||||
const parentRect = this.elements.parent.getBoundingClientRect();
|
||||
this.elements.contextmenu.style.display = "block";
|
||||
const rect = this.elements.contextmenu.getBoundingClientRect();
|
||||
const up = e.offsetY + rect.height > parentRect.bottom - 25;
|
||||
const left = e.offsetX + rect.width > parentRect.right - 5;
|
||||
const up = e.offsetY + rect.height > parentRect.height - 25;
|
||||
const left = e.offsetX + rect.width > parentRect.width - 5;
|
||||
this.elements.contextmenu.style.left = (e.offsetX - (left ? rect.width : 0)) + "px";
|
||||
this.elements.contextmenu.style.top = (e.offsetY - (up ? rect.height : 0)) + "px";
|
||||
})
|
||||
@ -4109,11 +4109,6 @@ class EmulatorJS {
|
||||
//This wouldnt work using :not()... strange.
|
||||
this.game.parentElement.classList.toggle("ejs_big_screen", positionInfo.width > 575);
|
||||
|
||||
if (!this.Module) return;
|
||||
const dpr = window.devicePixelRatio || 1;
|
||||
const width = positionInfo.width * dpr;
|
||||
const height = (positionInfo.height * dpr);
|
||||
this.Module.setCanvasSize(width, height);
|
||||
if (!this.handleSettingsResize) return;
|
||||
this.handleSettingsResize();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user