mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-05 06:47:56 +01:00
4ad3936afd
* refactoring result codes - Add a main enum who can handle some orphalin result codes and the default `ResultCode.Success` one. - Add sub-enum by services when it's needed. - Remove some empty line. - Recast all service calls to ResultCode. - Remove some unneeded static declaration. - Delete unused `NvHelper` class. * NvResult is back * Fix
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using Ryujinx.Common.Logging;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Apm
|
|
{
|
|
class ISession : IpcService
|
|
{
|
|
public ISession() { }
|
|
|
|
[Command(0)]
|
|
// SetPerformanceConfiguration(nn::apm::PerformanceMode, nn::apm::PerformanceConfiguration)
|
|
public ResultCode SetPerformanceConfiguration(ServiceCtx context)
|
|
{
|
|
PerformanceMode perfMode = (PerformanceMode)context.RequestData.ReadInt32();
|
|
PerformanceConfiguration perfConfig = (PerformanceConfiguration)context.RequestData.ReadInt32();
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
|
|
[Command(1)]
|
|
// GetPerformanceConfiguration(nn::apm::PerformanceMode) -> nn::apm::PerformanceConfiguration
|
|
public ResultCode GetPerformanceConfiguration(ServiceCtx context)
|
|
{
|
|
PerformanceMode perfMode = (PerformanceMode)context.RequestData.ReadInt32();
|
|
|
|
context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
|
|
|
|
Logger.PrintStub(LogClass.ServiceApm);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
}
|
|
} |