Skip to content

Commit d89edd2

Browse files
committed
Expose high performance session state
1 parent 7e4782d commit d89edd2

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

osu.Desktop/Performance/HighPerformanceSessionManager.cs

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System;
55
using System.Runtime;
6+
using System.Threading;
67
using osu.Framework.Allocation;
78
using osu.Framework.Logging;
89
using osu.Game.Performance;
@@ -11,6 +12,8 @@ namespace osu.Desktop.Performance
1112
{
1213
public class HighPerformanceSessionManager : IHighPerformanceSessionManager
1314
{
15+
public bool IsSessionActive => activeSessions > 0;
16+
1417
private int activeSessions;
1518

1619
private GCLatencyMode originalGCMode;

osu.Game/Performance/IHighPerformanceSessionManager.cs

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ namespace osu.Game.Performance
1414
/// </summary>
1515
public interface IHighPerformanceSessionManager
1616
{
17+
/// <summary>
18+
/// Whether a high performance session is currently active.
19+
/// </summary>
20+
bool IsSessionActive { get; }
21+
1722
/// <summary>
1823
/// Start a new high performance session.
1924
/// </summary>

0 commit comments

Comments
 (0)