mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-05 11:59:15 +00:00
handled the handles
This commit is contained in:
@@ -1,16 +1,31 @@
|
|||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
|
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||||
|
using Ryujinx.Horizon.Common;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Notification
|
namespace Ryujinx.HLE.HOS.Services.Notification
|
||||||
{
|
{
|
||||||
class INotificationSystemEventAccessor : IpcService
|
class INotificationSystemEventAccessor : IpcService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private readonly KEvent _getNotificationSendingNotifierEvent;
|
||||||
|
private int _getNotificationSendingNotifierEventHandle;
|
||||||
public INotificationSystemEventAccessor(ServiceCtx context) { }
|
public INotificationSystemEventAccessor(ServiceCtx context) { }
|
||||||
|
|
||||||
[CommandCmif(0)] // 9.0.0+
|
[CommandCmif(0)] // 9.0.0+
|
||||||
// GetNotificationSendingNotifier() -> nn::notification::server::INotificationSystemEventAccessor
|
// GetNotificationSendingNotifier() -> nn::notification::server::INotificationSystemEventAccessor
|
||||||
public ResultCode GetSystemEvent(ServiceCtx context)
|
public ResultCode GetSystemEvent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceNotification);
|
if (_getNotificationSendingNotifierEventHandle == 0)
|
||||||
|
{
|
||||||
|
if (context.Process.HandleTable.GenerateHandle(_getNotificationSendingNotifierEvent.ReadableEvent, out _getNotificationSendingNotifierEventHandle) != Result.Success)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Out of handles!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_getNotificationSendingNotifierEventHandle);
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user