mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 04:33:20 +08:00
Expose high performance session state
This commit is contained in:
parent
7e4782d4b1
commit
d89edd2b4f
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime;
|
using System.Runtime;
|
||||||
|
using System.Threading;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Performance;
|
using osu.Game.Performance;
|
||||||
@ -11,6 +12,8 @@ namespace osu.Desktop.Performance
|
|||||||
{
|
{
|
||||||
public class HighPerformanceSessionManager : IHighPerformanceSessionManager
|
public class HighPerformanceSessionManager : IHighPerformanceSessionManager
|
||||||
{
|
{
|
||||||
|
public bool IsSessionActive => activeSessions > 0;
|
||||||
|
|
||||||
private int activeSessions;
|
private int activeSessions;
|
||||||
|
|
||||||
private GCLatencyMode originalGCMode;
|
private GCLatencyMode originalGCMode;
|
||||||
|
@ -14,6 +14,11 @@ namespace osu.Game.Performance
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHighPerformanceSessionManager
|
public interface IHighPerformanceSessionManager
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a high performance session is currently active.
|
||||||
|
/// </summary>
|
||||||
|
bool IsSessionActive { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start a new high performance session.
|
/// Start a new high performance session.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user