Skip to content

Commit da031d8

Browse files
committed
Phaser games should now work again from the CocoonJS Launcher.
1 parent 7c9dfef commit da031d8

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Version 2.2.0 - "Bethal" - in development
159159
* P2.BodyDebug circles were drawing at half widths (thanks @enriqueto #1288)
160160
* FrameData.clone fixed when cloning data using frame names rather than indexes (thanks pjbaron)
161161
* Lots of the Cache getters (such as `Cache.getbitmapData`) would return `undefined` if the asset couldn't be found. They now all consistently return `null` for missing entries (thanks @Matoking #1305)
162+
* Phaser games should now work again from the CocoonJS Launcher.
162163

163164

164165
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/core/Game.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,9 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
376376
{
377377
window.setTimeout(this._onBoot, 0);
378378
}
379-
else if(typeof window.cordova !== "undefined")
379+
else if (typeof window.cordova !== "undefined" && !navigator['isCocoonJS'])
380380
{
381+
// Cordova, but NOT Cocoon?
381382
document.addEventListener('deviceready', this._onBoot, false);
382383
}
383384
else

0 commit comments

Comments
 (0)