Skip to content

Commit 5dbe6b6

Browse files
committed
The Uint32Array check used in Utils was incorrectly replacing Uint32Array on Safari, causing errors like BitmapData.getPixel32 to fail and other related issues (fixes phaserjs#1043 and phaserjs#1197)
1 parent 108a2a3 commit 5dbe6b6

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Version 2.1.2 - "Whitebridge" - in development
106106
* Color.createColor now populates the `color` property of the returned object with the results of `Phaser.Color.getColor`.
107107
* Color.createColor now has a `color32` property with the results of `Phaser.Color.getColor32`.
108108
* Color.hexToColor has been optimised to inline the regex and has moved the createColor call so it now populates the color object fully, not just setting the r,g,b properties.
109+
* Keyboard.PLUS and Keyboard.MINUS have been added to the list of key codes (thanks @VictorBjelkholm #1281)
109110

110111

111112

@@ -116,6 +117,8 @@ Version 2.1.2 - "Whitebridge" - in development
116117
* StateManager.boot would call start on a State twice if it was added to the game and started before the DOM load had completed. This didn't cause an error but was duplicating function calls needlessly.
117118
* Changing any of the Text properties such as font, lineSpacing and fontSize on a Text object that wasn't already on the display list would cause an updateTransform error. Parent is now checked first in all setters.
118119
* A Timer with a delay value that was a float and not an integer would not loop correctly. Timer delay values are now passed through Math.round to avoid this (thanks @osmanzeki #1196)
120+
* The Loader would incorrectly call `fileComplete` for legacy audio files instead of setting it as a callback, throwing up errors if the audio file failed to load (thanks @spayton #1212)
121+
* The Uint32Array check used in Utils was incorrectly replacing Uint32Array on Safari, causing errors like BitmapData.getPixel32 to fail and other related issues (fixes #1043 and #1197)
119122

120123

121124
For details about changes made in previous versions of Phaser see the full Change Log at https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md

src/utils/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ if (!Array.prototype.forEach)
504504
* Source: http://www.html5gamedevs.com/topic/5988-phaser-12-ie9/
505505
* Cameron Foale (http://www.kibibu.com)
506506
*/
507-
if (typeof window.Uint32Array !== "function")
507+
if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "object")
508508
{
509509
var CheapArray = function(type)
510510
{

0 commit comments

Comments
 (0)