A game framework written with osu! in mind.

Fix incorrect handling of 0 values

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