1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00

Ignore very long periods of no frame drawing when showing FPS counter ms value

This commit is contained in:
Dean Herbert 2022-08-08 15:17:33 +09:00
parent 81c079c937
commit 4f7d63be29

View File

@ -167,6 +167,11 @@ namespace osu.Game.Graphics.UserInterface
{
base.Update();
// If the game goes into a suspended state (ie. debugger attached or backgrounded on a mobile device)
// we want to ignore really long periods of no processing.
if (updateClock.ElapsedFrameTime > 10000)
return;
mainContent.Width = Math.Max(mainContent.Width, counters.DrawWidth);
// Handle the case where the window has become inactive or the user changed the