diff --git a/src/Ryujinx.Horizon/Am/Ipc/Controllers/CommonStateGetter.cs b/src/Ryujinx.Horizon/Am/Ipc/Controllers/CommonStateGetter.cs new file mode 100644 index 000000000..cb8d784a2 --- /dev/null +++ b/src/Ryujinx.Horizon/Am/Ipc/Controllers/CommonStateGetter.cs @@ -0,0 +1,327 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Am; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Am.Ipc.Controllers +{ + partial class CommonStateGetter : ICommonStateGetter + { + [CmifCommand(0)] + public Result GetEventHandle() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(1)] + public Result ReceiveMessage() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(2)] + public Result GetThisAppletKind() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(3)] + public Result AllowToEnterSleep() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(4)] + public Result DisallowToEnterSleep() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(5)] + public Result GetOperationMode() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(6)] + public Result GetPerformanceMode() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(7)] + public Result GetCradleStatus() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(8)] + public Result GetBootMode() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(9)] + public Result GetCurrentFocusState() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(10)] + public Result RequestToAcquireSleepLock() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(11)] + public Result ReleaseSleepLock() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(12)] + public Result ReleaseSleepLockTransiently() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(13)] + public Result GetAcquiredSleepLockEvent() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(14)] + public Result GetWakeupCount() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(20)] + public Result PushToGeneralChannel() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(30)] + public Result GetHomeButtonReaderLockAccessor() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(31)] + public Result GetReaderLockAccessorEx() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(32)] + public Result GetWriterLockAccessorEx() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(40)] + public Result GetCradleFwVersion() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(50)] + public Result IsVrModeEnabled() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(51)] + public Result SetVrModeEnabled() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(52)] + public Result SetLcdBacklightOffEnabled() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(53)] + public Result BeginVrModeEx() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(54)] + public Result EndVrModeEx() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(55)] + public Result IsInControllerFirmwareUpdateSection() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(59)] + public Result SetVrPositionForDebug() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(60)] + public Result GetDefaultDisplayResolution() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(61)] + public Result GetDefaultDisplayResolutionChangeEvent() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(62)] + public Result GetHdcpAuthenticationState() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(63)] + public Result GetHdcpAuthenticationStateChangeEvent() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(64)] + public Result SetTvPowerStateMatchingMode() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(65)] + public Result GetApplicationIdByContentActionName() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(66)] + public Result SetCpuBoostMode() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(67)] + public Result CancelCpuBoostMode() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(68)] + public Result GetBuiltInDisplayType() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(80)] + public Result PerformSystemButtonPressingIfInFocus() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(90)] + public Result SetPerformanceConfigurationChangedNotification() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(91)] + public Result GetCurrentPerformanceConfiguration() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(100)] + public Result SetHandlingHomeButtonShortPressedEnabled() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(110)] + public Result OpenMyGpuErrorHandler() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(120)] + public Result GetAppletLaunchedHistory() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(200)] + public Result GetOperationModeSystemInfo() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(300)] + public Result GetSettingsPlatformRegion() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(400)] + public Result ActivateMigrationService() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(401)] + public Result DeactivateMigrationService() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(500)] + public Result DisableSleepTillShutdown() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(501)] + public Result SuppressDisablingSleepTemporarily() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(502)] + public Result IsSleepEnabled() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(503)] + public Result IsDisablingSleepSuppressed() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(600)] + public Result OpenNamedChannelAsChild() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(900)] + public Result SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled() + { + throw new System.NotImplementedException(); + } + + [CmifCommand(910)] + public Result GetLaunchRequiredTick() + { + throw new System.NotImplementedException(); + } + } +} diff --git a/src/Ryujinx.Horizon/Am/Ipc/Proxies/SystemAppletProxy.cs b/src/Ryujinx.Horizon/Am/Ipc/Proxies/SystemAppletProxy.cs index 9f46cff86..54142aa20 100644 --- a/src/Ryujinx.Horizon/Am/Ipc/Proxies/SystemAppletProxy.cs +++ b/src/Ryujinx.Horizon/Am/Ipc/Proxies/SystemAppletProxy.cs @@ -1,3 +1,4 @@ +using Ryujinx.Horizon.Am.Ipc.Controllers; using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am; using Ryujinx.Horizon.Sdk.Sf; @@ -9,7 +10,9 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies [CmifCommand(0)] public Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter, ulong pid) { - throw new System.NotImplementedException(); + commonStateGetter = new CommonStateGetter(); + + return Result.Success; } [CmifCommand(1)] diff --git a/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs b/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs index c851ae95f..2fdb7dd87 100644 --- a/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs +++ b/src/Ryujinx.Horizon/Am/Ipc/ProxiesService.cs @@ -1,5 +1,6 @@ using LibHac.Diag; using Ryujinx.Common.Logging; +using Ryujinx.Horizon.Am.Ipc.Proxies; using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am; using Ryujinx.Horizon.Sdk.Sf; @@ -11,7 +12,7 @@ namespace Ryujinx.Horizon.Am.Ipc [CmifCommand(100)] public Result OpenSystemAppletProxy(out ISystemAppletProxy systemAppletProxy, [ClientProcessId] ulong pid) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + systemAppletProxy = new SystemAppletProxy(); return Result.Success; } @@ -19,7 +20,7 @@ namespace Ryujinx.Horizon.Am.Ipc [CmifCommand(200)] public Result OpenLibraryAppletProxyOld(out ILibraryAppletProxy libraryAppletProxy, [ClientProcessId] ulong pid) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + OpenLibraryAppletProxy(out libraryAppletProxy, pid); return Result.Success; } @@ -27,7 +28,7 @@ namespace Ryujinx.Horizon.Am.Ipc [CmifCommand(201)] public Result OpenLibraryAppletProxy(out ILibraryAppletProxy libraryAppletProxy, [ClientProcessId] ulong pid) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + libraryAppletProxy = new LibraryAppletProxy(); return Result.Success; } @@ -35,7 +36,7 @@ namespace Ryujinx.Horizon.Am.Ipc [CmifCommand(300)] public Result OpenOverlayAppletProxy(out IOverlayAppletProxy overlayAppletProxy, [ClientProcessId] ulong pid) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + overlayAppletProxy = new OverlayAppletProxy(); return Result.Success; } @@ -43,7 +44,7 @@ namespace Ryujinx.Horizon.Am.Ipc [CmifCommand(350)] public Result OpenSystemApplicationProxy(out IApplicationProxy applicationProxy, [ClientProcessId] ulong pid) { - Logger.Stub?.PrintStub(LogClass.ServiceAm); + applicationProxy = new ApplicationProxy(); return Result.Success; }