diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-08-28 13:02:50 +0200 |
|---|---|---|
| committer | Thomas Guillemard <me@thog.eu> | 2019-08-28 13:02:50 +0200 |
| commit | 6b8fb8a4e3da7b4864c65cf9842e89e462fcc81b (patch) | |
| tree | 3df7a7ae39b358eac79e536757cfe95078700191 /Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs | |
| parent | 5c44c9600f09c3faa45c01e2b94d01ac1715c71a (diff) | |
Implement am ICommonStateGetter::SetCpuBoostMode (#743)
- Implement am ICommonStateGetter::SetCpuBoostMode according to the RE:
```
signed __int64 __fastcall nn::ICommonStateGetter::SetCpuBoostModeImpl(__int64 this, unsigned int cpu_boost_mode)
{
if ( cpu_boost_mode > 1 )
{
return 0x3F480LL;
}
__int64 v2 = *(_QWORD *)(this + 0x38);
__int64 v3 = *(_QWORD *)(*(_QWORD *)(v2 + 8) + 0x298LL);
nnLock((_DWORD *)(v3 + 0x104));
__int64 v5 = *(_QWORD *)(v2 + 0x18);
bool unk_bool = *(unsigned __int8 *)(v5 + 0x7C);
*(_DWORD *)(v5 + 0x80) = cpu_boost_mode;
if (!unk_bool)
{
*(_BYTE *)(v5 + 0x7C) = 1;
}
wait_condvar(v3 + 0xA8);
nnUnlock((_DWORD *)(v3 + 0x104));
return 0LL;
}
```
- Add enum for apm CpuBoostMode
- Add missing values in apm PerformanceConfiguration with some comments.
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs b/Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs new file mode 100644 index 00000000..a4c87d3c --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Apm/CpuBoostMode.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.HLE.HOS.Services.Apm +{ + enum CpuBoostMode + { + Disabled = 0, + Mode1 = 1, // Use PerformanceConfiguration13 and PerformanceConfiguration14, or PerformanceConfiguration15 and PerformanceConfiguration16 + Mode2 = 2 // Use PerformanceConfiguration15 and PerformanceConfiguration16. + } +}
\ No newline at end of file |
