1
0
Fork 1
forked from suyu/suyu

am: GetFriendInvitationStorageChannelEvent

Closes #3829
This commit is contained in:
David Marcec 2020-04-30 22:37:26 +10:00
parent 3e9cafbee5
commit 10804d6d0e
2 changed files with 14 additions and 1 deletions

View file

@ -1169,7 +1169,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)
{121, nullptr, "ClearUserChannel"}, {121, nullptr, "ClearUserChannel"},
{122, nullptr, "UnpopToUserChannel"}, {122, nullptr, "UnpopToUserChannel"},
{130, &IApplicationFunctions::GetGpuErrorDetectedSystemEvent, "GetGpuErrorDetectedSystemEvent"}, {130, &IApplicationFunctions::GetGpuErrorDetectedSystemEvent, "GetGpuErrorDetectedSystemEvent"},
{140, nullptr, "GetFriendInvitationStorageChannelEvent"}, {140, &IApplicationFunctions::GetFriendInvitationStorageChannelEvent, "GetFriendInvitationStorageChannelEvent"},
{141, nullptr, "TryPopFromFriendInvitationStorageChannel"}, {141, nullptr, "TryPopFromFriendInvitationStorageChannel"},
{150, nullptr, "GetNotificationStorageChannelEvent"}, {150, nullptr, "GetNotificationStorageChannelEvent"},
{151, nullptr, "TryPopFromNotificationStorageChannel"}, {151, nullptr, "TryPopFromNotificationStorageChannel"},
@ -1186,6 +1186,9 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)
auto& kernel = system.Kernel(); auto& kernel = system.Kernel();
gpu_error_detected_event = Kernel::WritableEvent::CreateEventPair( gpu_error_detected_event = Kernel::WritableEvent::CreateEventPair(
kernel, "IApplicationFunctions:GpuErrorDetectedSystemEvent"); kernel, "IApplicationFunctions:GpuErrorDetectedSystemEvent");
friend_invitation_storage_channel_event = Kernel::WritableEvent::CreateEventPair(
kernel, "IApplicationFunctions:FriendInvitationStorageChannelEvent");
} }
IApplicationFunctions::~IApplicationFunctions() = default; IApplicationFunctions::~IApplicationFunctions() = default;
@ -1500,6 +1503,14 @@ void IApplicationFunctions::GetGpuErrorDetectedSystemEvent(Kernel::HLERequestCon
rb.PushCopyObjects(gpu_error_detected_event.readable); rb.PushCopyObjects(gpu_error_detected_event.readable);
} }
void IApplicationFunctions::GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(friend_invitation_storage_channel_event.readable);
}
void InstallInterfaces(SM::ServiceManager& service_manager, void InstallInterfaces(SM::ServiceManager& service_manager,
std::shared_ptr<NVFlinger::NVFlinger> nvflinger, Core::System& system) { std::shared_ptr<NVFlinger::NVFlinger> nvflinger, Core::System& system) {
auto message_queue = std::make_shared<AppletMessageQueue>(system.Kernel()); auto message_queue = std::make_shared<AppletMessageQueue>(system.Kernel());

View file

@ -280,10 +280,12 @@ private:
void QueryApplicationPlayStatistics(Kernel::HLERequestContext& ctx); void QueryApplicationPlayStatistics(Kernel::HLERequestContext& ctx);
void QueryApplicationPlayStatisticsByUid(Kernel::HLERequestContext& ctx); void QueryApplicationPlayStatisticsByUid(Kernel::HLERequestContext& ctx);
void GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx); void GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx);
void GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx);
bool launch_popped_application_specific = false; bool launch_popped_application_specific = false;
bool launch_popped_account_preselect = false; bool launch_popped_account_preselect = false;
Kernel::EventPair gpu_error_detected_event; Kernel::EventPair gpu_error_detected_event;
Kernel::EventPair friend_invitation_storage_channel_event;
Core::System& system; Core::System& system;
}; };