diff --git a/cocos/core/game.js b/cocos/core/game.js index ba86e5c6b4..55e07f8fec 100644 --- a/cocos/core/game.js +++ b/cocos/core/game.js @@ -174,6 +174,12 @@ class Game extends EventTarget { */ setFrameRate(frameRate) { var config = this.config; + if (typeof frameRate !== 'number') { + frameRate = parseInt(frameRate); + if (isNaN(frameRate)) { + frameRate = 60; + } + } config.frameRate = frameRate; if (this._intervalId) window.cancelAnimFrame(this._intervalId); diff --git a/cocos/core/platform/CCView.js b/cocos/core/platform/CCView.js index 464dc1349d..8345a41d70 100644 --- a/cocos/core/platform/CCView.js +++ b/cocos/core/platform/CCView.js @@ -1080,7 +1080,7 @@ class ContainerStrategy { var locCanvas = cc.game.canvas, locContainer = cc.game.container; if (cc.sys.platform !== cc.sys.WECHAT_GAME) { - if (cc.sys.os === cc.sys.OS_ANDROID) { + if (cc.sys.os !== cc.sys.OS_IOS) { document.body.style.width = (view._isRotated ? h : w) + 'px'; document.body.style.height = (view._isRotated ? w : h) + 'px'; }