Skip to content

Commit

Permalink
fix: Loader logo resolution glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Sep 15, 2024
1 parent 6606c28 commit 41e2036
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/engine/Director/Loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ export class Loader extends DefaultLoader {
}

public override async onBeforeLoad(): Promise<void> {
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
Expand Down

0 comments on commit 41e2036

Please sign in to comment.