diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index 545c1eb462..7ae97eb906 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -666,7 +666,7 @@ var game = { localCanvas = window.sharedCanvas || wx.getSharedCanvas(); } else if (CC_JSB) { - localCanvas = window.__cccanvas; + localCanvas = window.__canvas; } else { localCanvas = canvas; diff --git a/cocos2d/core/platform/CCSys.js b/cocos2d/core/platform/CCSys.js index f020482aca..01a129a2df 100644 --- a/cocos2d/core/platform/CCSys.js +++ b/cocos2d/core/platform/CCSys.js @@ -1130,7 +1130,7 @@ function initSys () { sys.garbageCollect = function () { // N/A in web if (CC_JSB) { - __jsc__.garbageCollect(); + jsb.garbageCollect(); } }; @@ -1141,7 +1141,7 @@ function initSys () { sys.dumpRoot = function () { // N/A in web if (CC_JSB) { - __jsc__.dumpRoot(); + jsb.dumpRoot(); } }; diff --git a/cocos2d/core/renderer/render-engine.jsb.js b/cocos2d/core/renderer/render-engine.jsb.js index 4f6952f508..5fc7a5a197 100644 --- a/cocos2d/core/renderer/render-engine.jsb.js +++ b/cocos2d/core/renderer/render-engine.jsb.js @@ -30,7 +30,7 @@ // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -var gl = window.__ccgl; +var gl = window.__gl; var _filterGL = [ [ gl.GL_NEAREST, gl.GL_NEAREST_MIPMAP_NEAREST, gl.GL_NEAREST_MIPMAP_LINEAR ], @@ -369,11 +369,11 @@ VertexFormat.prototype.element = function element (attrName) { // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. -var gl$1 = window.__ccgl; +var gl$1 = window.__gl; var gfx$1 = window.gfx; window.device = gfx$1.Device.getInstance(); -window.device._gl = window.__ccgl; +window.device._gl = window.__gl; //FIXME: window.device._stats = { vb: 0 }; diff --git a/predefine.js b/predefine.js index 9f2e4ef449..58b0043fad 100644 --- a/predefine.js +++ b/predefine.js @@ -137,7 +137,7 @@ defineMacro('CC_JSB', defined('jsb')); defineMacro('CC_BUILD', false); defineMacro('CC_WECHATGAME', defined('wx') && wx.getSystemInfoSync); defineMacro('CC_QQPLAY', defined('bk')); -defineMacro('CC_RUNTIME', false); +defineMacro('CC_RUNTIME', 'function' === typeof loadRuntime); defineMacro('CC_SUPPORT_JIT', !(CC_WECHATGAME || CC_QQPLAY || CC_RUNTIME)); //