From 76fc0ef9c2997beacda6e9be31174d083e942c8f Mon Sep 17 00:00:00 2001 From: SijieWang Date: Wed, 19 Feb 2020 16:49:00 +0800 Subject: [PATCH] Non-browser processes are currently not supported (#6193) --- cocos/core/platform/sys.ts | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/cocos/core/platform/sys.ts b/cocos/core/platform/sys.ts index beae8a28ca..0a99ea73c6 100644 --- a/cocos/core/platform/sys.ts +++ b/cocos/core/platform/sys.ts @@ -563,24 +563,25 @@ if (_global.__globalAdapter && _global.__globalAdapter.adaptSys) { // init sys info in adapter _global.__globalAdapter.adaptSys(sys); } -else if (CC_EDITOR) { - sys.isMobile = false; - sys.platform = sys.EDITOR_CORE; - sys.language = sys.LANGUAGE_UNKNOWN; - sys.os = ({ - darwin: sys.OS_OSX, - win32: sys.OS_WINDOWS, - linux: sys.OS_LINUX, - // @ts-ignore - })[process.platform] || sys.OS_UNKNOWN; - sys.browserType = null; - sys.browserVersion = null; - sys.windowPixelResolution = { - width: 0, - height: 0, - }; - sys.__audioSupport = {}; -} +// TODO: main process flag +// else if (CC_EDITOR) { +// sys.isMobile = false; +// sys.platform = sys.EDITOR_CORE; +// sys.language = sys.LANGUAGE_UNKNOWN; +// sys.os = ({ +// darwin: sys.OS_OSX, +// win32: sys.OS_WINDOWS, +// linux: sys.OS_LINUX, +// // @ts-ignore +// })[process.platform] || sys.OS_UNKNOWN; +// sys.browserType = null; +// sys.browserVersion = null; +// sys.windowPixelResolution = { +// width: 0, +// height: 0, +// }; +// sys.__audioSupport = {}; +// } else if (CC_JSB) { // @ts-ignore const platform = sys.platform = __getPlatform();