Swapped the ScaleManager creation order in Game, so both start and stop fullScreen requests work now.

This commit is contained in:
photonstorm 2014-07-01 16:50:33 +01:00
parent 7c7e924b7a
commit db22b019be
2 changed files with 5 additions and 1 deletions

View file

@ -426,10 +426,11 @@ Phaser.Game.prototype = {
this.math = Phaser.Math;
this.stage = new Phaser.Stage(this, this.width, this.height);
this.scale = new Phaser.ScaleManager(this, this.width, this.height);
this.setUpRenderer();
this.scale = new Phaser.ScaleManager(this, this.width, this.height);
this.device.checkFullScreenSupport();
this.world = new Phaser.World(this);

View file

@ -506,9 +506,11 @@ Phaser.Device.prototype = {
for (var i = 0; i < fs.length; i++)
{
if (this.game.canvas[fs[i]])
// if (document[fs[i]])
{
this.fullscreen = true;
this.requestFullscreen = fs[i];
break;
}
}
@ -530,6 +532,7 @@ Phaser.Device.prototype = {
if (document[cfs[i]])
{
this.cancelFullscreen = cfs[i];
break;
}
}
}