diff --git a/README.md b/README.md index 7fd19e06d..4c011d019 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ New features: * Group.sendToBottom(child) is the handy opposite of Group.bringToTop() * Group.moveUp(child) will move a child up the display list, swapping with the child above it. * Group.moveDown(child) will move a child down the display list, swapping with the child below it. +* Device.windowsPhone is now tested for. Updates: @@ -192,6 +193,7 @@ Bug Fixes: * Calling destroy while in an Input Event callback now works for either the parent Group or the calling object itself. * Loader.replaceInFileList wouldn't over-write the previous entry correctly, which caused the Loader.image overwrite parameter to fail (thanks basoko, fixes #493) * If the game was set to NO_SCALE and you swapped orientation, it would pause and resize, then fail to resize when you swapped back (thanks starnut, fixes #258) +* Device no longer things a Windows Phone or Windows Tablet are desktop devices (thanks wombatbuddy, fixes #506) TO DO: diff --git a/src/system/Device.js b/src/system/Device.js index 0e60d498c..15e500a27 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -81,6 +81,12 @@ Phaser.Device = function (game) { */ this.windows = false; + /** + * @property {boolean} windowsPhone - Is running on a Windows Phone? + * @default + */ + this.windowsPhone = false; + // Features /** @@ -398,6 +404,11 @@ Phaser.Device.prototype = { else if (/Windows/.test(ua)) { this.windows = true; + + if (/Windows Phone/i.test(ua)) + { + this.windowsPhone = true; + } } if (this.windows || this.macOS || (this.linux && this.silk === false)) @@ -405,6 +416,12 @@ Phaser.Device.prototype = { this.desktop = true; } + // Windows Phone / Table reset + if (this.windowsPhone || ((/Windows NT/i.test(ua)) && (/Touch/i.test(ua)))) + { + this.desktop = false; + } + }, /** diff --git a/src/time/Time.js b/src/time/Time.js index 1d447ac5d..79d578490 100644 --- a/src/time/Time.js +++ b/src/time/Time.js @@ -362,12 +362,15 @@ Phaser.Time.prototype = { }, /** - * Resets the private _started value to now. + * Resets the private _started value to now and removes all currently running Timers. * * @method Phaser.Time#reset */ reset: function () { + this._started = this.now; + this.removeAll(); + } };