Skip to content

Commit

Permalink
Perf: Don't spam fpsStream with the same value
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Dec 28, 2024
1 parent bc27cad commit bee8208
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/flame/ricochlime_game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ class RicochlimeGame extends Forge2DGame
static int get fps => _fps;
static int _fps = 0;
static set fps(int fps) {
if (fps == _fps) return;
_fps = fps;
if (_fpsStreamController.hasListener) _fpsStreamController.add(fps);
}
Expand Down

0 comments on commit bee8208

Please sign in to comment.