From 6261dcfe027ef1159b137c53a0fb9865b42c1ed5 Mon Sep 17 00:00:00 2001 From: rspruel Date: Thu, 3 Jul 2025 01:41:02 +0000 Subject: [PATCH] Updating recalculate primary display container size to ensure it is an even resolution --- core/display.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/display.js b/core/display.js index 347ecbf5..1d0effd1 100644 --- a/core/display.js +++ b/core/display.js @@ -264,11 +264,11 @@ export default class Display { let i = 0; //recalculate primary display container size - this._screens[i].containerHeight = this._target.parentNode.offsetHeight; - this._screens[i].containerWidth = this._target.parentNode.offsetWidth; + this._screens[i].containerHeight = Math.floor(this._target.parentNode.offsetHeight / 2) * 2; + this._screens[i].containerWidth = Math.floor(this._target.parentNode.offsetWidth / 2) * 2; this._screens[i].pixelRatio = window.devicePixelRatio; - this._screens[i].width = this._target.parentNode.offsetWidth; - this._screens[i].height = this._target.parentNode.offsetHeight; + this._screens[i].width = this._screens[i].containerWidth; + this._screens[i].height = this._screens[i].containerHeight; //calculate server-side and client-side resolution of each screen let width = max_width || this._screens[i].containerWidth;