1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-25 08:56:01 +00:00
Ryujinx/Ryujinx.HLE/HOS/Services/Friend
Ac_K 36f62cbe72 friends: INotificationService Implementation of GetEvent (#710)
* friends: INotificationService Implementation of GetEvent

According to the RE, the event isn't signaled when handle is returned.
```C
long nn::friends::detail::service::NotificationService::GetEvent(long this, uint *output_handle)
{
  long inner_struct_event;
  int result;

  if (this->event_created)
  {
    inner_struct_event = &this->event_object;
  }
  else
  {
    inner_struct_event = &this->event_object;
    result = CreateEvent(&this->event_object, 0, 1);

    if ( result )
    {
      Assert();
    }

    this->event_created = true;
  }

  uint event_handle = nn::os::detail::DetachReadableHandleOfInterProcessEvent(inner_struct_event);

  *output_handle = event_handle;
  int unknown = *((char *)output_handle + 4);
  *((char *)output_handle + 4) = 1;

  if (unknown)
  {
    CloseHandle(*output_handle);
  }

  return 0LL;
}
```
Co-Authored-By: Thomas Guillemard <me@thog.eu>
2019-06-27 14:05:30 +02:00
..
FriendErr.cs friends: INotificationService Implementation of GetEvent (#710) 2019-06-27 14:05:30 +02:00
IDaemonSuspendSessionService.cs friends: Implementation of IServiceCreator (#704) 2019-06-17 01:08:32 +02:00
IFriendService.cs Refactoring of acc:u0 (#701) 2019-06-16 00:35:38 +02:00
IFriendServiceTypes.cs Implement friend:a IFriendService: 10101 (#429) 2018-09-25 19:59:29 -03:00
INotificationService.cs friends: INotificationService Implementation of GetEvent (#710) 2019-06-27 14:05:30 +02:00
IServiceCreator.cs friends: INotificationService Implementation of GetEvent (#710) 2019-06-27 14:05:30 +02:00