mirror of https://github.com/ppy/osu
Expose high performance session state
This commit is contained in:
parent
7e4782d4b1
commit
d89edd2b4f
|
@ -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;
|
||||
|
|
|
@ -14,6 +14,11 @@ namespace osu.Game.Performance
|
|||
/// </summary>
|
||||
public interface IHighPerformanceSessionManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether a high performance session is currently active.
|
||||
/// </summary>
|
||||
bool IsSessionActive { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Start a new high performance session.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue