Skip to content

Commit 1c5a106

Browse files
committed
Modify updateRender call to use desiredFps rate when spiralling is detected.
1 parent bc70ce7 commit 1c5a106

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/core/Game.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,8 @@ Phaser.Game.prototype = {
719719
this._deltaTime = 0;
720720
this._spiralling = 0;
721721

722-
var slowStep = this.time.slowMotion * 1000.0 / this.time.desiredFps;
722+
// call the game render update exactly once every frame
723+
this.updateRender(this.time.slowMotion * this.time.desiredFps);
723724
}
724725
else
725726
{
@@ -757,10 +758,10 @@ Phaser.Game.prototype = {
757758
}
758759

759760
this._lastCount = count;
760-
}
761761

762-
// call the game render update exactly once every frame
763-
this.updateRender(this._deltaTime / slowStep);
762+
// call the game render update exactly once every frame unless we're playing catch-up from a spiral condition
763+
this.updateRender(this._deltaTime / slowStep);
764+
}
764765

765766
},
766767

0 commit comments

Comments
 (0)