mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 23:24:41 +00:00
Device.iOSVersion now contains the major version number of iOS.
This commit is contained in:
parent
27457c2b0f
commit
d16de32fe3
1 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,12 @@ Phaser.Device = function () {
|
|||
*/
|
||||
this.iOS = false;
|
||||
|
||||
/**
|
||||
* @property {number} iOSVersion - If running in iOS this will contain the major version number.
|
||||
* @default
|
||||
*/
|
||||
this.iOSVersion = 0;
|
||||
|
||||
/**
|
||||
* @property {boolean} cocoonJS - Is the game running under CocoonJS?
|
||||
* @default
|
||||
|
@ -658,6 +664,8 @@ Phaser.Device._initialize = function () {
|
|||
else if (/iP[ao]d|iPhone/i.test(ua))
|
||||
{
|
||||
device.iOS = true;
|
||||
var v = (navigator.appVersion).match(/OS (\d+)/);
|
||||
device.iOSVersion = parseInt(RegExp.$1, 10);
|
||||
}
|
||||
else if (/Linux/.test(ua))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue