Skip to content

Commit f9b4419

Browse files
committed
Uses Scale Manager sizes
1 parent 99591f0 commit f9b4419

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/boot/CreateRenderer.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ var CreateRenderer = function (game)
5757
if (config.canvas)
5858
{
5959
game.canvas = config.canvas;
60+
61+
game.canvas.width = game.scale.canvasWidth;
62+
game.canvas.height = game.scale.canvasHeight;
6063
}
6164
else
6265
{
63-
game.canvas = CanvasPool.create(game, config.width * config.resolution, config.height * config.resolution, config.renderType);
66+
game.canvas = CanvasPool.create(game, game.scale.canvasWidth, game.scale.canvasHeight, config.renderType);
6467
}
6568

6669
// Does the game config provide some canvas css styles to use?
@@ -75,10 +78,6 @@ var CreateRenderer = function (game)
7578
CanvasInterpolation.setCrisp(game.canvas);
7679
}
7780

78-
// Zoomed?
79-
game.canvas.style.width = (config.width * config.zoom).toString() + 'px';
80-
game.canvas.style.height = (config.height * config.zoom).toString() + 'px';
81-
8281
if (config.renderType === CONST.HEADLESS)
8382
{
8483
// Nothing more to do here

0 commit comments

Comments
 (0)