Skip to content

Commit 5f704f0

Browse files
committed
Merge pull request phaserjs#2130 from noidexe/patch-5
Better default value for suggestedFps
2 parents 4e208c7 + dea95ec commit 5f704f0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/time/Time.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,13 @@ Phaser.Time = function (game) {
140140
* The suggested frame rate for your game, based on an averaged real frame rate.
141141
* This value is only populated if `Time.advancedTiming` is enabled.
142142
*
143-
* _Note:_ This is not available until after a few frames have passed; use it after a few seconds (eg. after the menus)
143+
* _Note:_ This is not available until after a few frames have passed; until then
144+
* it's set to the same value as desiredFps.
144145
*
145146
* @property {number} suggestedFps
146147
* @default
147148
*/
148-
this.suggestedFps = null;
149+
this.suggestedFps = this.desiredFps;
149150

150151
/**
151152
* Scaling factor to make the game move smoothly in slow motion

0 commit comments

Comments
 (0)