tangled
alpha
login
or
join now
keii.dev
/
osu-framework
A game framework written with osu! in mind.
0
fork
atom
overview
issues
pulls
pipelines
Fix incorrect handling of 0 values
Dean Herbert
4 years ago
f97efe67
eabf367b
+3
-3
3 changed files
expand all
collapse all
unified
split
osu.Framework
Graphics
Performance
FrameTimeDisplay.cs
Statistics
PerformanceMonitor.cs
Timing
ThrottledFrameClock.cs
+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
}