VERY experimental Nintendo Switch 2 emulator
C++
am: Implement GetNotificationStorageChannelEvent
german77a36409ff1675
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cppindex a538f82e34..c3ac73131b 100644--- a/src/core/hle/service/am/am.cpp+++ b/src/core/hle/service/am/am.cpp@@ -1270,7 +1270,8 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx)IApplicationFunctions::IApplicationFunctions(Core::System& system_): ServiceFramework{system_, "IApplicationFunctions"}, gpu_error_detected_event{system.Kernel()},friend_invitation_storage_channel_event{system.Kernel()},- health_warning_disappeared_system_event{system.Kernel()} {+ notification_storage_channel_event{system.Kernel()}, health_warning_disappeared_system_event{+ system.Kernel()} {// clang-format offstatic const FunctionInfo functions[] = {{1, &IApplicationFunctions::PopLaunchParameter, "PopLaunchParameter"},@@ -1322,7 +1323,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_){131, nullptr, "SetDelayTimeToAbortOnGpuError"},{140, &IApplicationFunctions::GetFriendInvitationStorageChannelEvent, "GetFriendInvitationStorageChannelEvent"},{141, &IApplicationFunctions::TryPopFromFriendInvitationStorageChannel, "TryPopFromFriendInvitationStorageChannel"},- {150, nullptr, "GetNotificationStorageChannelEvent"},+ {150, &IApplicationFunctions::GetNotificationStorageChannelEvent, "GetNotificationStorageChannelEvent"},{151, nullptr, "TryPopFromNotificationStorageChannel"},{160, &IApplicationFunctions::GetHealthWarningDisappearedSystemEvent, "GetHealthWarningDisappearedSystemEvent"},{170, nullptr, "SetHdcpAuthenticationActivated"},@@ -1340,11 +1341,14 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)Kernel::KAutoObject::Create(std::addressof(gpu_error_detected_event));Kernel::KAutoObject::Create(std::addressof(friend_invitation_storage_channel_event));+ Kernel::KAutoObject::Create(std::addressof(notification_storage_channel_event));Kernel::KAutoObject::Create(std::addressof(health_warning_disappeared_system_event));gpu_error_detected_event.Initialize("IApplicationFunctions:GpuErrorDetectedSystemEvent");friend_invitation_storage_channel_event.Initialize("IApplicationFunctions:FriendInvitationStorageChannelEvent");+ notification_storage_channel_event.Initialize(+ "IApplicationFunctions:NotificationStorageChannelEvent");health_warning_disappeared_system_event.Initialize("IApplicationFunctions:HealthWarningDisappearedSystemEvent");}@@ -1762,6 +1766,14 @@ void IApplicationFunctions::TryPopFromFriendInvitationStorageChannel(rb.Push(ERR_NO_DATA_IN_CHANNEL);}+void IApplicationFunctions::GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx) {+ LOG_DEBUG(Service_AM, "called");++ IPC::ResponseBuilder rb{ctx, 2, 1};+ rb.Push(ResultSuccess);+ rb.PushCopyObjects(notification_storage_channel_event.GetReadableEvent());+}+void IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx) {LOG_DEBUG(Service_AM, "called");diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.hindex 184030a8e2..c13aa5787d 100644--- a/src/core/hle/service/am/am.h+++ b/src/core/hle/service/am/am.h@@ -295,6 +295,7 @@ private:void GetGpuErrorDetectedSystemEvent(Kernel::HLERequestContext& ctx);void GetFriendInvitationStorageChannelEvent(Kernel::HLERequestContext& ctx);void TryPopFromFriendInvitationStorageChannel(Kernel::HLERequestContext& ctx);+ void GetNotificationStorageChannelEvent(Kernel::HLERequestContext& ctx);void GetHealthWarningDisappearedSystemEvent(Kernel::HLERequestContext& ctx);bool launch_popped_application_specific = false;@@ -302,6 +303,7 @@ private:s32 previous_program_index{-1};Kernel::KEvent gpu_error_detected_event;Kernel::KEvent friend_invitation_storage_channel_event;+ Kernel::KEvent notification_storage_channel_event;Kernel::KEvent health_warning_disappeared_system_event;};