Bad logic in display. Somehow never encountered this??? Resolves #3

This commit is contained in:
Matt McWilliams 2024-10-22 16:37:15 -04:00
parent 3c88de83b8
commit 74935eb50c
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ class Display {
this.source = new Dimensions(width, height);
if (this.source.getRatio() > this.screen.getRatio()) {
console.log('a');
this.display = new Dimensions(this.screen.width, Math.floor(this.source.width / this.source.getRatio()));
this.display = new Dimensions(this.screen.width, Math.floor(this.screen.width / this.source.getRatio()));
offset = this.screen.height - this.display.height;
this.offset = { x: 0, y: Math.round(offset / 2) };
}

View File

@ -53,7 +53,7 @@ export class Display {
this.source = new Dimensions(width, height);
if (this.source.getRatio() > this.screen.getRatio()) {
console.log('a');
this.display = new Dimensions(this.screen.width, Math.floor(this.source.width / this.source.getRatio()));
this.display = new Dimensions(this.screen.width, Math.floor(this.screen.width / this.source.getRatio()));
offset = this.screen.height - this.display.height;
this.offset = { x: 0, y : Math.round(offset / 2) };
} else {