diff options
| author | Ac_K <Acoustik666@gmail.com> | 2020-05-12 16:52:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-12 16:52:27 +0200 |
| commit | 76e1a162dd32792e54a9b5acb241c6aeedbdaf7d (patch) | |
| tree | 055d6e29924fd6cbe48b2bc614df43b02c9a8bb0 | |
| parent | 4b79b78b8c3b9cd6deed46e6aa38acabfc47d25b (diff) | |
am: Implement GetFriendInvitationStorageChannelEvent (#1220)
* am: Implement GetFriendInvitationStorageChannelEvent
This implement GetFriendInvitationStorageChannelEvent according to RE, needed by Streets of Rage 4
* Fix handle name
* add GetNotificationStorageChannelEvent
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs index 6ba506a1..b83c6b69 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs @@ -22,10 +22,14 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati class IApplicationFunctions : IpcService { private KEvent _gpuErrorDetectedSystemEvent; + private KEvent _friendInvitationStorageChannelEvent; + private KEvent _notificationStorageChannelEvent; public IApplicationFunctions(Horizon system) { - _gpuErrorDetectedSystemEvent = new KEvent(system.KernelContext); + _gpuErrorDetectedSystemEvent = new KEvent(system.KernelContext); + _friendInvitationStorageChannelEvent = new KEvent(system.KernelContext); + _notificationStorageChannelEvent = new KEvent(system.KernelContext); } [Command(1)] @@ -301,5 +305,33 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati return ResultCode.Success; } + + [Command(140)] // 9.0.0+ + // GetFriendInvitationStorageChannelEvent() -> handle<copy> + public ResultCode GetFriendInvitationStorageChannelEvent(ServiceCtx context) + { + if (context.Process.HandleTable.GenerateHandle(_friendInvitationStorageChannelEvent.ReadableEvent, out int friendInvitationStorageChannelEventHandle) != KernelResult.Success) + { + throw new InvalidOperationException("Out of handles!"); + } + + context.Response.HandleDesc = IpcHandleDesc.MakeCopy(friendInvitationStorageChannelEventHandle); + + return ResultCode.Success; + } + + [Command(150)] // 9.0.0+ + // GetNotificationStorageChannelEvent() -> handle<copy> + public ResultCode GetNotificationStorageChannelEvent(ServiceCtx context) + { + if (context.Process.HandleTable.GenerateHandle(_notificationStorageChannelEvent.ReadableEvent, out int notificationStorageChannelEventHandle) != KernelResult.Success) + { + throw new InvalidOperationException("Out of handles!"); + } + + context.Response.HandleDesc = IpcHandleDesc.MakeCopy(notificationStorageChannelEventHandle); + + return ResultCode.Success; + } } }
\ No newline at end of file |
