A game framework written with osu! in mind.

Fix incorrect handling of 0 values

Changed files
+3 -3
osu.Framework
Graphics
Performance
Statistics
Timing
+1 -1
osu.Framework/Graphics/Performance/FrameTimeDisplay.cs
··· 99 99 elapsedSinceLastUpdate = 0; 100 100 101 101 counter.Text = $"{displayFps:0}fps ({rollingElapsed:0.00}ms)" 102 - + (clock.Throttling ? $"{(clock.MaximumUpdateHz < 10000 ? clock.MaximumUpdateHz.ToString("0") : "∞").PadLeft(4)}hz" : string.Empty); 102 + + (clock.Throttling ? $"{(clock.MaximumUpdateHz > 0 && clock.MaximumUpdateHz < 10000 ? clock.MaximumUpdateHz.ToString("0") : "∞").PadLeft(4)}hz" : string.Empty); 103 103 } 104 104 105 105 private class CounterText : SpriteText
+1 -1
osu.Framework/Statistics/PerformanceMonitor.cs
··· 57 57 58 58 private Thread thread; 59 59 60 - public double FrameAimTime => 1000.0 / (Clock?.MaximumUpdateHz ?? double.MaxValue); 60 + public double FrameAimTime => 1000.0 / (Clock?.MaximumUpdateHz > 0 ? Clock.MaximumUpdateHz : double.MaxValue); 61 61 62 62 internal PerformanceMonitor(GameThread thread, IEnumerable<StatisticsCounterType> counters) 63 63 {
+1 -1
osu.Framework/Timing/ThrottledFrameClock.cs
··· 40 40 41 41 if (Throttling) 42 42 { 43 - if (MaximumUpdateHz > 0) 43 + if (MaximumUpdateHz > 0 && MaximumUpdateHz < double.MaxValue) 44 44 { 45 45 throttle(); 46 46 }