A game framework written with osu! in mind.

Add exception for realtime runs and document changes better

Changed files
+15 -2
osu.Framework
+15 -2
osu.Framework/Platform/HeadlessGameHost.cs
··· 51 51 { 52 52 base.SetupForRun(); 53 53 54 + // We want the draw thread to run, but it doesn't matter how fast it runs. 55 + // This limiting is mostly to reduce CPU overhead. 54 56 MaximumDrawHz = 60; 55 - MaximumUpdateHz = MaximumInactiveHz = 1000; 57 + 58 + if (!realtime) 59 + { 60 + customClock = new FramedClock(new FastClock(CLOCK_RATE)); 56 61 57 - if (!realtime) customClock = new FramedClock(new FastClock(CLOCK_RATE)); 62 + // time is incremented per frame, rather than based on the real-world time. 63 + // therefore our goal is to run frames as fast as possible. 64 + MaximumUpdateHz = MaximumInactiveHz = 0; 65 + } 66 + else 67 + { 68 + // in realtime runs, set a sane upper limit to avoid cpu overhead from spinning. 69 + MaximumUpdateHz = MaximumInactiveHz = 1000; 70 + } 58 71 } 59 72 60 73 protected override void DrawFrame()