Skip to content

Commit eee1183

Browse files
committed
Forces use of a Canvas Renderer under CocoonJS automatically.
The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
1 parent 0c675f7 commit eee1183

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Version 2.0.6 - "Jornhill" - -in development-
6464
### CocoonJS Specific Updates
6565

6666
* Wrapped all touch, keyboard, mouse and fulscreen events that CocoonJS doesn't support in conditional checks to avoid Warnings.
67+
* Forces use of a Canvas Renderer under CocoonJS automatically.
68+
* The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
6769

6870
### New Features
6971

src/core/Game.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ Phaser.Game.prototype = {
391391

392392
},
393393

394-
395394
/**
396395
* Initialize engine sub modules and start the game.
397396
*
@@ -543,7 +542,7 @@ Phaser.Game.prototype = {
543542
*/
544543
setUpRenderer: function () {
545544

546-
if (this.device.trident)
545+
if (this.device.trident || this.device.cocoonJS)
547546
{
548547
// Pixi WebGL renderer on IE11 doesn't work correctly at the moment, the pre-multiplied alpha gets all washed out.
549548
// So we're forcing canvas for now until this is fixed, sorry. It's got to be better than no game appearing at all, right?

src/sound/SoundManager.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Phaser.SoundManager.prototype = {
120120
this.channels = 1;
121121
}
122122

123-
if (this.game.device.iOS || (window['PhaserGlobal'] && window['PhaserGlobal'].fakeiOSTouchLock))
123+
if (!this.game.device.cocoonJS && this.game.device.iOS || (window['PhaserGlobal'] && window['PhaserGlobal'].fakeiOSTouchLock))
124124
{
125125
this.game.input.touch.callbackContext = this;
126126
this.game.input.touch.touchStartCallback = this.unlock;
@@ -130,7 +130,6 @@ Phaser.SoundManager.prototype = {
130130
}
131131
else
132132
{
133-
// What about iOS5?
134133
this.touchLocked = false;
135134
}
136135

0 commit comments

Comments
 (0)