mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
Merge commit 'c70d7d6f617a42270ce463e1782ecfe16ffbc784' into v2.0-release
This commit is contained in:
@@ -661,6 +661,7 @@ function initSys () {
|
||||
sys.isMobile = true;
|
||||
sys.platform = sys.QQ_PLAY;
|
||||
sys.language = sys.LANGUAGE_UNKNOWN;
|
||||
var system = env.system.toLowerCase();
|
||||
if (env.platform === "android") {
|
||||
sys.os = sys.OS_ANDROID;
|
||||
}
|
||||
@@ -671,8 +672,13 @@ function initSys () {
|
||||
sys.os = sys.OS_UNKNOWN;
|
||||
}
|
||||
|
||||
var version = /[\d\.]+/.exec(env.version);
|
||||
sys.osVersion = version[0];
|
||||
// Adaptation to Android P
|
||||
if (system === 'android p') {
|
||||
system = 'android p 9.0';
|
||||
}
|
||||
|
||||
var version = /[\d\.]+/.exec(system);
|
||||
sys.osVersion = version ? version[0] : system;
|
||||
sys.osMainVersion = parseInt(sys.osVersion.split('.')[0]);
|
||||
sys.browserType = sys.BROWSER_TYPE_QQ_PLAY;
|
||||
sys.browserVersion = 0;
|
||||
|
||||
Reference in New Issue
Block a user