mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 21:46:15 -04:00
Build 29074010
This commit is contained in:
parent
613b7cce58
commit
7e8643ceed
9 changed files with 20 additions and 14 deletions
|
@ -221,7 +221,10 @@ window.addEventListener("fullscreenchange", () => fitSize(gameState));
|
|||
|
||||
setInterval(() => {
|
||||
// Sometimes, the page changes size without triggering the event (when switching to fullscreen, closing debug panel...)
|
||||
const { width, height } = gameCanvas.getBoundingClientRect();
|
||||
|
||||
const width = window.innerWidth,
|
||||
height = window.innerHeight;
|
||||
|
||||
if (width !== gameState.canvasWidth || height !== gameState.canvasHeight)
|
||||
fitSize(gameState);
|
||||
}, 1000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue