From 1094ab0fcb92e1ecc8a942e94691dc261405190a Mon Sep 17 00:00:00 2001 From: jerrywwl Date: Thu, 4 Apr 2019 12:19:17 +0800 Subject: [PATCH] revert hack code --- cocos/core/game.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos/core/game.js b/cocos/core/game.js index ce9cf9d7ee..11eba66dc7 100644 --- a/cocos/core/game.js +++ b/cocos/core/game.js @@ -699,8 +699,12 @@ class Game extends EventTarget { this._gfxDevice = new cc.WebGLGFXDevice(); } + cc.view.enableRetina(true) + cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE); + cc.view._initFrameSize(); let nativeWidth = Math.floor(screen.width * cc.view._devicePixelRatio); let nativeHeight = Math.floor(screen.height * cc.view._devicePixelRatio); + this._gfxDevice.initialize({ canvasElm: localCanvas, debug: true,