mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 00:16:23 +02:00
test 1: add an event handle
This commit is contained in:
parent
0e84f2b1f0
commit
c674e82877
1 changed files with 22 additions and 0 deletions
|
@ -31,11 +31,13 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
private readonly KEvent _friendInvitationStorageChannelEvent;
|
||||
private readonly KEvent _notificationStorageChannelEvent;
|
||||
private readonly KEvent _healthWarningDisappearedSystemEvent;
|
||||
private readonly KEvent _unknownEvent;
|
||||
|
||||
private int _gpuErrorDetectedSystemEventHandle;
|
||||
private int _friendInvitationStorageChannelEventHandle;
|
||||
private int _notificationStorageChannelEventHandle;
|
||||
private int _healthWarningDisappearedSystemEventHandle;
|
||||
private int _unknownEventHandle;
|
||||
|
||||
private bool _gamePlayRecordingState;
|
||||
|
||||
|
@ -50,6 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
_friendInvitationStorageChannelEvent = new KEvent(system.KernelContext);
|
||||
_notificationStorageChannelEvent = new KEvent(system.KernelContext);
|
||||
_healthWarningDisappearedSystemEvent = new KEvent(system.KernelContext);
|
||||
_unknownEvent = new KEvent(system.KernelContext);
|
||||
|
||||
_horizon = system.LibHacHorizonManager.AmClient;
|
||||
}
|
||||
|
@ -647,6 +650,25 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(210)]
|
||||
// GetUnknownEvent() -> handle<copy>
|
||||
public ResultCode GetUnknownEvent(ServiceCtx context)
|
||||
{
|
||||
if (_unknownEventHandle == 0)
|
||||
{
|
||||
if (context.Process.HandleTable.GenerateHandle(_unknownEvent.ReadableEvent, out _unknownEventHandle) != Result.Success)
|
||||
{
|
||||
throw new InvalidOperationException("Out of handles!");
|
||||
}
|
||||
}
|
||||
|
||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_unknownEventHandle);
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandCmif(1001)] // 10.0.0+
|
||||
// PrepareForJit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue