Remove canvas resize call as this is now handled by the backend

This commit is contained in:
Ethan O'Brien 2025-07-02 22:47:04 -05:00
parent 84a1fc13d7
commit b0601b6226
No known key found for this signature in database
GPG Key ID: 7A6E7CCD3BD93AB1

View File

@ -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();
}