File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1666,7 +1666,7 @@ var _initSys = function () {
1666
1666
* @name isMobile
1667
1667
* @type {Boolean }
1668
1668
*/
1669
- sys . isMobile = ua . indexOf ( ' mobile' ) !== - 1 || ua . indexOf ( 'android' ) !== - 1 ;
1669
+ sys . isMobile = / m o b i l e | a n d r o i d | i p h o n e | i p a d / . test ( ua ) ;
1670
1670
1671
1671
/**
1672
1672
* Indicate the running platform
@@ -1701,6 +1701,11 @@ var _initSys = function () {
1701
1701
iOS = true ;
1702
1702
osVersion = uaResult [ 2 ] || '' ;
1703
1703
osMainVersion = parseInt ( osVersion ) || 0 ;
1704
+ }
1705
+ else if ( / ( i P h o n e | i P a d | i P o d ) / . exec ( nav . platform ) ) {
1706
+ iOS = true ;
1707
+ osVersion = '' ;
1708
+ osMainVersion = 0 ;
1704
1709
}
1705
1710
1706
1711
var osName = sys . OS_UNKNOWN ;
@@ -2089,7 +2094,7 @@ function _afterEngineLoaded(config) {
2089
2094
if ( cc . _initDebugSetting )
2090
2095
cc . _initDebugSetting ( config [ cc . game . CONFIG_KEY . debugMode ] ) ;
2091
2096
cc . _engineLoaded = true ;
2092
- cc . log ( cc . ENGINE_VERSION ) ;
2097
+ console . log ( cc . ENGINE_VERSION ) ;
2093
2098
if ( _engineLoadedCallback ) _engineLoadedCallback ( ) ;
2094
2099
}
2095
2100
You can’t perform that action at this time.
0 commit comments