mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
GlobalStateController
This commit is contained in:
parent
9af23b49f2
commit
d3e93e587e
7 changed files with 154 additions and 4 deletions
125
src/Ryujinx.Horizon/Am/Ipc/Controllers/GlobalStateController.cs
Normal file
125
src/Ryujinx.Horizon/Am/Ipc/Controllers/GlobalStateController.cs
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.Horizon.Common;
|
||||||
|
using Ryujinx.Horizon.Sdk.Am;
|
||||||
|
using Ryujinx.Horizon.Sdk.Am.Controllers;
|
||||||
|
using Ryujinx.Horizon.Sdk.Sf;
|
||||||
|
|
||||||
|
namespace Ryujinx.Horizon.Am.Ipc.Controllers
|
||||||
|
{
|
||||||
|
partial class GlobalStateController : IGlobalStateController
|
||||||
|
{
|
||||||
|
[CmifCommand(0)]
|
||||||
|
public Result RequestToEnterSleep()
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return AmResult.Stubbed;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(1)]
|
||||||
|
public Result EnterSleep()
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return AmResult.Stubbed;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(2)]
|
||||||
|
public Result StartSleepSequence(bool arg0)
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(3)]
|
||||||
|
public Result StartShutdownSequence()
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(4)]
|
||||||
|
public Result StartRebootSequence()
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(9)]
|
||||||
|
public Result IsAutoPowerDownRequested(out bool arg0)
|
||||||
|
{
|
||||||
|
arg0 = false;
|
||||||
|
// Uses #idle:sys cmd1
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(10)]
|
||||||
|
public Result LoadAndApplyIdlePolicySettings()
|
||||||
|
{
|
||||||
|
// Uses #idle:sys cmd LoadAndApplySettings
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(11)]
|
||||||
|
public Result NotifyCecSettingsChanged()
|
||||||
|
{
|
||||||
|
// Uses #omm cmd NotifyCecSettingsChanged
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(12)]
|
||||||
|
public Result SetDefaultHomeButtonLongPressTime(long arg0)
|
||||||
|
{
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(13)]
|
||||||
|
public Result UpdateDefaultDisplayResolution()
|
||||||
|
{
|
||||||
|
// Uses #omm cmd UpdateDefaultDisplayResolution
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(14)]
|
||||||
|
public Result ShouldSleepOnBoot(out bool arg0)
|
||||||
|
{
|
||||||
|
arg0 = false;
|
||||||
|
// Uses #omm cmd ShouldSleepOnBoot
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(15)]
|
||||||
|
public Result GetHdcpAuthenticationFailedEvent(out int arg0)
|
||||||
|
{
|
||||||
|
arg0 = 0;
|
||||||
|
// Uses #omm cmd GetHdcpAuthenticationFailedEvent
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CmifCommand(30)]
|
||||||
|
public Result OpenCradleFirmwareUpdater(out ICradleFirmwareUpdater arg0)
|
||||||
|
{
|
||||||
|
arg0 = new CradleFirmwareUpdater();
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -87,9 +87,11 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
|
||||||
}
|
}
|
||||||
|
|
||||||
[CmifCommand(23)]
|
[CmifCommand(23)]
|
||||||
public Result GetGlobalStateController()
|
public Result GetGlobalStateController(out IGlobalStateController globalStateController)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
globalStateController = new GlobalStateController();
|
||||||
|
|
||||||
|
return Result.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
[CmifCommand(1000)]
|
[CmifCommand(1000)]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using Ryujinx.Horizon.Common;
|
using Ryujinx.Horizon.Common;
|
||||||
using Ryujinx.Horizon.Sdk.Am.Storage;
|
using Ryujinx.Horizon.Sdk.Am.Storage;
|
||||||
using Ryujinx.Horizon.Sdk.Sf;
|
using Ryujinx.Horizon.Sdk.Sf;
|
||||||
|
|
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ryujinx.Horizon.Am.Ipc.Storage
|
namespace Ryujinx.Horizon.Am.Ipc.Storage
|
||||||
{
|
{
|
||||||
|
// Might not be used outside of debug software
|
||||||
partial class StorageChannel : IStorageChannel
|
partial class StorageChannel : IStorageChannel
|
||||||
{
|
{
|
||||||
private readonly Stack<IStorage> _storages;
|
private readonly Stack<IStorage> _storages;
|
||||||
|
|
|
@ -23,5 +23,6 @@ namespace Ryujinx.Horizon.Sdk.Am
|
||||||
public static Result StackPoolExhausted => new(Moduleld, 712);
|
public static Result StackPoolExhausted => new(Moduleld, 712);
|
||||||
public static Result DebugModeNotEnabled => new(Moduleld, 974);
|
public static Result DebugModeNotEnabled => new(Moduleld, 974);
|
||||||
public static Result DevFunctionNotEnabled => new(Moduleld, 980);
|
public static Result DevFunctionNotEnabled => new(Moduleld, 980);
|
||||||
|
public static Result Stubbed => new(Moduleld, 999);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
using Ryujinx.Horizon.Common;
|
||||||
|
using Ryujinx.Horizon.Sdk.Sf;
|
||||||
|
|
||||||
|
namespace Ryujinx.Horizon.Sdk.Am.Controllers
|
||||||
|
{
|
||||||
|
interface IGlobalStateController : IServiceObject
|
||||||
|
{
|
||||||
|
Result RequestToEnterSleep();
|
||||||
|
Result EnterSleep();
|
||||||
|
Result StartSleepSequence(bool arg0);
|
||||||
|
Result StartShutdownSequence();
|
||||||
|
Result StartRebootSequence();
|
||||||
|
Result IsAutoPowerDownRequested(out bool arg0);
|
||||||
|
Result LoadAndApplyIdlePolicySettings();
|
||||||
|
Result NotifyCecSettingsChanged();
|
||||||
|
Result SetDefaultHomeButtonLongPressTime(long arg0);
|
||||||
|
Result UpdateDefaultDisplayResolution();
|
||||||
|
Result ShouldSleepOnBoot(out bool arg0);
|
||||||
|
Result GetHdcpAuthenticationFailedEvent(out int arg0);
|
||||||
|
Result OpenCradleFirmwareUpdater(out ICradleFirmwareUpdater arg0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ namespace Ryujinx.Horizon.Sdk.Am.Proxies
|
||||||
Result OpenLibraryAppletSelfAccessor(out ILibraryAppletSelfAccessor libraryAppletSelfAccessor);
|
Result OpenLibraryAppletSelfAccessor(out ILibraryAppletSelfAccessor libraryAppletSelfAccessor);
|
||||||
Result GetAppletCommonFunctions(out IAppletCommonFunctions appletCommonFunctions);
|
Result GetAppletCommonFunctions(out IAppletCommonFunctions appletCommonFunctions);
|
||||||
Result GetHomeMenuFunctions();
|
Result GetHomeMenuFunctions();
|
||||||
Result GetGlobalStateController();
|
Result GetGlobalStateController(out IGlobalStateController globalStateController);
|
||||||
Result GetDebugFunctions(out IDebugFunctions debugFunctions);
|
Result GetDebugFunctions(out IDebugFunctions debugFunctions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue