Skip to content

Commit b61edd0

Browse files
committed
Update display aspect ratio in setGameSize()
Fixes phaserjs#4971
1 parent 88b088b commit b61edd0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/scale/ScaleManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ var ScaleManager = new Class({
768768
}
769769

770770
// The size used for the canvas style, factoring in the scale mode and parent and zoom value
771-
// We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)
772-
this.displaySize.setSize(width, height);
771+
// Update the aspect ratio
772+
this.displaySize.setAspectRatio(width / height);
773773

774774
this.canvas.width = this.baseSize.width;
775775
this.canvas.height = this.baseSize.height;

0 commit comments

Comments
 (0)