aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Apm/PerformanceState.cs
blob: 86a1491de2fca3de2730004673b7acfb538e6cb4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
namespace Ryujinx.HLE.HOS.Services.Apm
{
    class PerformanceState
    {
        public PerformanceState() { }

        public bool CpuOverclockEnabled = false;

        public PerformanceMode PerformanceMode = PerformanceMode.Default;
        public CpuBoostMode CpuBoostMode = CpuBoostMode.Disabled;

        public PerformanceConfiguration DefaultPerformanceConfiguration = PerformanceConfiguration.PerformanceConfiguration7;
        public PerformanceConfiguration BoostPerformanceConfiguration = PerformanceConfiguration.PerformanceConfiguration8;

        public PerformanceConfiguration GetCurrentPerformanceConfiguration(PerformanceMode performanceMode)
        {
            return performanceMode switch
            {
                PerformanceMode.Default => DefaultPerformanceConfiguration,
                PerformanceMode.Boost => BoostPerformanceConfiguration,
                _ => PerformanceConfiguration.PerformanceConfiguration7,
            };
        }
    }
}