diff --git a/osu.Desktop/Performance/HighPerformanceSessionManager.cs b/osu.Desktop/Performance/HighPerformanceSessionManager.cs index 058d247aee..34762de04d 100644 --- a/osu.Desktop/Performance/HighPerformanceSessionManager.cs +++ b/osu.Desktop/Performance/HighPerformanceSessionManager.cs @@ -3,6 +3,7 @@ using System; using System.Runtime; +using System.Threading; using osu.Framework.Allocation; using osu.Framework.Logging; using osu.Game.Performance; @@ -11,6 +12,8 @@ namespace osu.Desktop.Performance { public class HighPerformanceSessionManager : IHighPerformanceSessionManager { + public bool IsSessionActive => activeSessions > 0; + private int activeSessions; private GCLatencyMode originalGCMode; diff --git a/osu.Game/Performance/IHighPerformanceSessionManager.cs b/osu.Game/Performance/IHighPerformanceSessionManager.cs index d3d1fda8fc..cc995e4942 100644 --- a/osu.Game/Performance/IHighPerformanceSessionManager.cs +++ b/osu.Game/Performance/IHighPerformanceSessionManager.cs @@ -14,6 +14,11 @@ namespace osu.Game.Performance /// public interface IHighPerformanceSessionManager { + /// + /// Whether a high performance session is currently active. + /// + bool IsSessionActive { get; } + /// /// Start a new high performance session. ///