Refactoring HOS folder structure (#771)
* Refactoring HOS folder structure Refactoring HOS folder structure: - Added some subfolders when needed (Following structure decided in private). - Added some `Types` folders when needed. - Little cleanup here and there. - Add services placeholders for every HOS services (close #766 and #753). * Remove Types namespaces
This commit is contained in:
parent
4af3101b22
commit
a0720b5681
393 changed files with 2540 additions and 1299 deletions
45
Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmServer.cs
Normal file
45
Ryujinx.HLE/HOS/Services/Ptm/Psm/IPsmServer.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using Ryujinx.Common.Logging;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Ptm.Psm
|
||||
{
|
||||
[Service("psm")]
|
||||
class IPsmServer : IpcService
|
||||
{
|
||||
public IPsmServer(ServiceCtx context) { }
|
||||
|
||||
[Command(0)]
|
||||
// GetBatteryChargePercentage() -> u32
|
||||
public static ResultCode GetBatteryChargePercentage(ServiceCtx context)
|
||||
{
|
||||
int chargePercentage = 100;
|
||||
|
||||
context.ResponseData.Write(chargePercentage);
|
||||
|
||||
Logger.PrintStub(LogClass.ServicePsm, new { chargePercentage });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(1)]
|
||||
// GetChargerType() -> u32
|
||||
public static ResultCode GetChargerType(ServiceCtx context)
|
||||
{
|
||||
ChargerType chargerType = ChargerType.ChargerOrDock;
|
||||
|
||||
context.ResponseData.Write((int)chargerType);
|
||||
|
||||
Logger.PrintStub(LogClass.ServicePsm, new { chargerType });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(7)]
|
||||
// OpenSession() -> IPsmSession
|
||||
public ResultCode OpenSession(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IPsmSession(context.Device.System));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue