mirror of
https://github.com/wassname/phaser.git
synced 2026-09-12 12:40:47 +08:00
Game no longer pauses if you've forced orientation and change it, also doesn't resize a NO_SCALE game.
If the game was set to NO_SCALE and you swapped orientation, it would pause and resize, then fail to resize when you swapped back (thanks starnut, fixes #258)
This commit is contained in:
@@ -409,7 +409,6 @@ Phaser.ScaleManager.prototype = {
|
||||
if ((this.forceLandscape && window.innerWidth > window.innerHeight) || (this.forcePortrait && window.innerHeight > window.innerWidth))
|
||||
{
|
||||
// Back to normal
|
||||
this.game.paused = false;
|
||||
this.incorrectOrientation = false;
|
||||
this.leaveIncorrectOrientation.dispatch();
|
||||
|
||||
@@ -419,7 +418,10 @@ Phaser.ScaleManager.prototype = {
|
||||
this.game.world.visible = true;
|
||||
}
|
||||
|
||||
this.refresh();
|
||||
if (this.scaleMode !== Phaser.ScaleManager.NO_SCALE)
|
||||
{
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -427,7 +429,6 @@ Phaser.ScaleManager.prototype = {
|
||||
if ((this.forceLandscape && window.innerWidth < window.innerHeight) || (this.forcePortrait && window.innerHeight < window.innerWidth))
|
||||
{
|
||||
// Show orientation screen
|
||||
this.game.paused = true;
|
||||
this.incorrectOrientation = true;
|
||||
this.enterIncorrectOrientation.dispatch();
|
||||
|
||||
@@ -437,7 +438,10 @@ Phaser.ScaleManager.prototype = {
|
||||
this.game.world.visible = false;
|
||||
}
|
||||
|
||||
this.refresh();
|
||||
if (this.scaleMode !== Phaser.ScaleManager.NO_SCALE)
|
||||
{
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user