From 41e20361da43c58b379eb5db228d6742f6b74cd3 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Sat, 14 Sep 2024 21:59:40 -0500 Subject: [PATCH] fix: Loader logo resolution glitch --- CHANGELOG.md | 1 + src/engine/Director/Loader.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f94ab7a4f..3729ae263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ are doing mtv adjustments during precollision. ### Fixed +- Fixed issue where the `ex.Loader` would have a low res logo on small configured resolution sizes - Fixed issue where `ex.Gif` was not parsing certain binary formats correctly - Fixed issue where the boot `ex.Loader` was removing pixelRatio override - Fixed `ex.RasterOptions`, it now extends `ex.GraphicsOptions` which is the underlying truth diff --git a/src/engine/Director/Loader.ts b/src/engine/Director/Loader.ts index 15d348459..72b29439d 100644 --- a/src/engine/Director/Loader.ts +++ b/src/engine/Director/Loader.ts @@ -320,6 +320,9 @@ export class Loader extends DefaultLoader { } public override async onBeforeLoad(): Promise { + this.screen.pushResolutionAndViewport(); + this.screen.resolution = this.screen.viewport; + this.screen.applyResolutionAndViewport(); const image = this._image; await this._imageLoaded.promise; await image?.decode(); // decode logo if it exists