mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
Non-browser processes are currently not supported (#6193)
This commit is contained in:
+19
-18
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user