Skip to content

Commit b9dcf74

Browse files
committed
If the device is detected as a Windows Phone the renderer is automatically set to use Canvas, even if WebGL or AUTO was requested (thanks @ramarro123 phaserjs#1706)
1 parent 0f31358 commit b9dcf74

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ Version 2.4 - "Katar" - in dev
375375
* RenderTexture now takes the display objects alpha into consideration when rendering it, before it would always reset worldAlpha to 1 before rendering, thus ignoring any alpha that may be set.
376376
* P2.enableBody now checks if an anchor exists on target object before attempting to set its value (thanks @standardgaussian #1885)
377377
* Debug.currentAlpha wasn't being used to set the alpha of the Debug context at all (was always set to 1) but now updates the alpha of the Debug context before anything is rendered to it (thanks @wayfu #1888)
378+
* If the device is detected as a Windows Phone the renderer is automatically set to use Canvas, even if WebGL or AUTO was requested (thanks @ramarro123 #1706)
378379

379380
### Bug Fixes
380381

src/core/Game.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,12 @@ Phaser.Game.prototype = {
696696
}
697697
}
698698

699+
// Until Windows Phone supports otherwise ...
700+
if (this.device.windowsPhone)
701+
{
702+
this.renderType = Phaser.CANVAS;
703+
}
704+
699705
if (this.renderType === Phaser.HEADLESS || this.renderType === Phaser.CANVAS || (this.renderType === Phaser.AUTO && this.device.webGL === false))
700706
{
701707
if (this.device.canvas)

0 commit comments

Comments
 (0)