Skip to content

Commit 7467992

Browse files
committed
Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, phaserjs#995)
1 parent 8c486f5 commit 7467992

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Version 2.1.0 - "Shienar" - -in development-
5555

5656
### Bug Fixes
5757

58+
* Fixed pixel perfect dragging (thanks @jeroenverfallie, fix #996)
59+
* Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995)
60+
5861
### Migration Guide
5962

6063
There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system.

src/core/Game.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,11 @@ Phaser.Game.prototype = {
643643
this.pendingStep = true;
644644
}
645645

646-
this.debug.preUpdate();
646+
if (this.config['enableDebug'])
647+
{
648+
this.debug.preUpdate();
649+
}
650+
647651
this.physics.preUpdate();
648652
this.state.preUpdate();
649653
this.plugins.preUpdate();
@@ -664,8 +668,11 @@ Phaser.Game.prototype = {
664668
else
665669
{
666670
this.state.pauseUpdate();
667-
// this.input.update();
668-
this.debug.preUpdate();
671+
672+
if (this.config['enableDebug'])
673+
{
674+
this.debug.preUpdate();
675+
}
669676
}
670677

671678
if (this.renderType != Phaser.HEADLESS)

0 commit comments

Comments
 (0)