From 0d746d446ada4a43c2ee7d283e858c033bdf6dcf Mon Sep 17 00:00:00 2001 From: Maufeat Date: Thu, 26 Jun 2025 16:53:26 +0200 Subject: [PATCH] add new library app creator cmd 3 --- src/core/hle/service/am/applet.cpp | 2 +- src/core/hle/service/am/applet.h | 1 + .../hle/service/am/service/application_functions.cpp | 9 ++++++++- src/core/hle/service/am/service/application_functions.h | 1 + .../hle/service/am/service/library_applet_creator.cpp | 2 +- src/core/hle/service/sockets/sockets.cpp | 1 + 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/am/applet.cpp b/src/core/hle/service/am/applet.cpp index 59ade29c8e..84821bc811 100644 --- a/src/core/hle/service/am/applet.cpp +++ b/src/core/hle/service/am/applet.cpp @@ -12,7 +12,7 @@ Applet::Applet(Core::System& system, std::unique_ptr process_, bool is_ process(std::move(process_)), hid_registration(system, *process), gpu_error_detected_event(context), friend_invitation_storage_channel_event(context), notification_storage_channel_event(context), health_warning_disappeared_system_event(context), - acquired_sleep_lock_event(context), pop_from_general_channel_event(context), + unkown210_event(context), acquired_sleep_lock_event(context), pop_from_general_channel_event(context), library_applet_launchable_event(context), accumulated_suspended_tick_changed_event(context), sleep_lock_event(context), state_changed_event(context) { diff --git a/src/core/hle/service/am/applet.h b/src/core/hle/service/am/applet.h index 571904fab4..24ddd97e27 100644 --- a/src/core/hle/service/am/applet.h +++ b/src/core/hle/service/am/applet.h @@ -119,6 +119,7 @@ struct Applet { Event friend_invitation_storage_channel_event; Event notification_storage_channel_event; Event health_warning_disappeared_system_event; + Event unkown210_event; Event acquired_sleep_lock_event; Event pop_from_general_channel_event; Event library_applet_launchable_event; diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index 93c45bc699..b057491cdd 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -87,7 +87,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_ {181, nullptr, "UpgradeLaunchRequiredVersion"}, {190, nullptr, "SendServerMaintenanceOverlayNotification"}, {200, nullptr, "GetLastApplicationExitReason"}, - {210, nullptr, "Unknown210"}, //20.0.0+ + {210, D<&IApplicationFunctions::Unknown210>, "Unknown210"}, //20.0.0+ {220, nullptr, "Unknown220"}, //20.0.0+ {300, nullptr, "CreateMovieWriter"}, //19.0.0+ {310, nullptr, "Unknown310"}, //20.0.0+ @@ -481,6 +481,13 @@ Result IApplicationFunctions::GetHealthWarningDisappearedSystemEvent( R_SUCCEED(); } +Result IApplicationFunctions::Unknown210( + OutCopyHandle out_event) { + LOG_DEBUG(Service_AM, "called"); + *out_event = m_applet->unkown210_event.GetHandle(); + R_SUCCEED(); +} + Result IApplicationFunctions::PrepareForJit() { LOG_WARNING(Service_AM, "(STUBBED) called"); diff --git a/src/core/hle/service/am/service/application_functions.h b/src/core/hle/service/am/service/application_functions.h index 10025a152b..0f961183c9 100644 --- a/src/core/hle/service/am/service/application_functions.h +++ b/src/core/hle/service/am/service/application_functions.h @@ -76,6 +76,7 @@ private: Result TryPopFromFriendInvitationStorageChannel(Out> out_storage); Result GetNotificationStorageChannelEvent(OutCopyHandle out_event); Result GetHealthWarningDisappearedSystemEvent(OutCopyHandle out_event); + Result Unknown210(OutCopyHandle out_event); Result PrepareForJit(); const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/library_applet_creator.cpp b/src/core/hle/service/am/service/library_applet_creator.cpp index e9cc6651e0..e401811a02 100644 --- a/src/core/hle/service/am/service/library_applet_creator.cpp +++ b/src/core/hle/service/am/service/library_applet_creator.cpp @@ -174,7 +174,7 @@ ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_, std::shared_ {0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"}, {1, nullptr, "TerminateAllLibraryApplets"}, {2, nullptr, "AreAnyLibraryAppletsLeft"}, - {3, nullptr, "Unknown3"}, //20.0.0+ + {3, D<&ILibraryAppletCreator::CreateLibraryApplet>, "Unknown3"}, // 20.0.0+ {10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"}, {11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"}, {12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"}, diff --git a/src/core/hle/service/sockets/sockets.cpp b/src/core/hle/service/sockets/sockets.cpp index 676d24e036..713270cec2 100644 --- a/src/core/hle/service/sockets/sockets.cpp +++ b/src/core/hle/service/sockets/sockets.cpp @@ -14,6 +14,7 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("bsd:s", std::make_shared(system, "bsd:s")); server_manager->RegisterNamedService("bsd:u", std::make_shared(system, "bsd:u")); + server_manager->RegisterNamedService("bsd:a", std::make_shared(system, "bsd:a")); server_manager->RegisterNamedService("bsdcfg", std::make_shared(system)); server_manager->RegisterNamedService("nsd:a", std::make_shared(system, "nsd:a")); server_manager->RegisterNamedService("nsd:u", std::make_shared(system, "nsd:u"));