Skip to content

Commit 6ddd164

Browse files
committed
Canvas now uses game config resolution
1 parent 16d597c commit 6ddd164

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/boot/CreateRenderer.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var CreateRenderer = function (game)
6060
}
6161
else
6262
{
63-
game.canvas = CanvasPool.create(game, config.width, config.height, config.renderType);
63+
game.canvas = CanvasPool.create(game, config.width * config.resolution, config.height * config.resolution, config.renderType);
6464
}
6565

6666
// Does the game config provide some canvas css styles to use?
@@ -76,11 +76,8 @@ var CreateRenderer = function (game)
7676
}
7777

7878
// Zoomed?
79-
if (config.zoom !== 1)
80-
{
81-
game.canvas.style.width = (config.width * config.zoom).toString() + 'px';
82-
game.canvas.style.height = (config.height * config.zoom).toString() + 'px';
83-
}
79+
game.canvas.style.width = (config.width * config.zoom).toString() + 'px';
80+
game.canvas.style.height = (config.height * config.zoom).toString() + 'px';
8481

8582
if (config.renderType === CONST.HEADLESS)
8683
{

0 commit comments

Comments
 (0)