From 6ddd1644f276eac2f6352020834b3b5a99b5713b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 17 Jul 2018 22:43:52 +0100 Subject: [PATCH] Canvas now uses game config resolution --- src/boot/CreateRenderer.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/boot/CreateRenderer.js b/src/boot/CreateRenderer.js index b45ab8de3..f38d94ec9 100644 --- a/src/boot/CreateRenderer.js +++ b/src/boot/CreateRenderer.js @@ -60,7 +60,7 @@ var CreateRenderer = function (game) } else { - game.canvas = CanvasPool.create(game, config.width, config.height, config.renderType); + game.canvas = CanvasPool.create(game, config.width * config.resolution, config.height * config.resolution, config.renderType); } // Does the game config provide some canvas css styles to use? @@ -76,11 +76,8 @@ var CreateRenderer = function (game) } // Zoomed? - if (config.zoom !== 1) - { - game.canvas.style.width = (config.width * config.zoom).toString() + 'px'; - game.canvas.style.height = (config.height * config.zoom).toString() + 'px'; - } + game.canvas.style.width = (config.width * config.zoom).toString() + 'px'; + game.canvas.style.height = (config.height * config.zoom).toString() + 'px'; if (config.renderType === CONST.HEADLESS) {