Skip to content

Commit

Permalink
cherry pick: change CC_WECHATGAME_SUB to CC_WECHATGAMESUB (cocos#3233)
Browse files Browse the repository at this point in the history
Commit:
19b042a
  • Loading branch information
wuzhiming authored and jareguo committed Dec 19, 2018
1 parent c4fd37d commit a3ad409
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cocos2d/core/platform/CCSys.js
Expand Up @@ -684,7 +684,7 @@ function initSys () {
sys.osVersion = version ? version[0] : system;
sys.osMainVersion = parseInt(sys.osVersion);
// wechagame subdomain
if (CC_WECHATGAME_SUB) {
if (CC_WECHATGAMESUB) {
sys.browserType = sys.BROWSER_TYPE_WECHAT_GAME_SUB;
}
else {
Expand Down
6 changes: 3 additions & 3 deletions predefine.js
Expand Up @@ -139,14 +139,14 @@ defineMacro('CC_BUILD', false);
if (CC_BUILD) {
// Supports dynamically access from external scripts such as adapters and debugger.
// So macros should still defined in global even if inlined in engine.
_global.CC_BUILD = CC_BUILD;
_global.CC_TEST = CC_TEST;
_global.CC_EDITOR = CC_EDITOR;
_global.CC_PREVIEW = CC_PREVIEW;
_global.CC_DEV = CC_DEV;
_global.CC_DEBUG = CC_DEBUG;
_global.CC_JSB = CC_JSB;
_global.CC_BUILD = CC_BUILD;
_global.CC_WECHATGAME_SUB = CC_WECHATGAME_SUB;
_global.CC_WECHATGAMESUB = CC_WECHATGAMESUB;
_global.CC_WECHATGAME = CC_WECHATGAME;
_global.CC_QQPLAY = CC_QQPLAY;
_global.CC_RUNTIME = CC_RUNTIME;
Expand All @@ -161,7 +161,7 @@ else {
defineMacro('CC_DEV', true); // (CC_EDITOR && !CC_BUILD) || CC_PREVIEW || CC_TEST
defineMacro('CC_DEBUG', true); // CC_DEV || Debug Build
defineMacro('CC_JSB', defined('jsb'));
defineMacro('CC_WECHATGAME_SUB', !!(defined('wx') && wx.getSharedCanvas));
defineMacro('CC_WECHATGAMESUB', !!(defined('wx') && wx.getSharedCanvas));
defineMacro('CC_WECHATGAME', !!(defined('wx') && (wx.getSystemInfoSync || wx.getSharedCanvas)));
defineMacro('CC_QQPLAY', defined('bk'));
defineMacro('CC_RUNTIME', 'function' === typeof loadRuntime);
Expand Down

0 comments on commit a3ad409

Please sign in to comment.