1
0
mirror of https://github.com/ppy/osu.git synced 2024-05-15 04:10:24 +08:00

Expose high performance session state

This commit is contained in:
Dean Herbert 2024-04-16 09:51:43 +08:00
parent 7e4782d4b1
commit d89edd2b4f
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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>