Skip to content

Commit 5d4fdb7

Browse files
committed
Don’t count the stat label’s batch toward the total.
1 parent 4e9cc94 commit 5d4fdb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cocos2d/CCDirector.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,8 @@ -(void) showStats
864864
NSString *fpsstr = [[NSString alloc] initWithFormat:@"%.1f", _frameRate];
865865
[_FPSLabel setString:fpsstr];
866866

867-
NSString *draws = [[NSString alloc] initWithFormat:@"%4lu", (unsigned long)__ccNumberOfDraws];
867+
// Subtract one for the stat label's own batch. This caused a lot of confusion on the forums...
868+
NSString *draws = [[NSString alloc] initWithFormat:@"%4lu", (unsigned long)__ccNumberOfDraws - 1];
868869
[_drawsLabel setString:draws];
869870
}
870871

0 commit comments

Comments
 (0)