From 0f8be2d2cc54feda0a52ec8f9633fd022879816a Mon Sep 17 00:00:00 2001 From: Subv Date: Fri, 4 Dec 2015 16:05:23 -0500 Subject: HLE/Applets: Implemented a dummy Mii Selector applet. This prevents some games (like Super Mario 3D Land) from freezing when trying to launch it, however, it's not complete and won't let you go past Mii selection as the parameter structure hasn't been reverse engineered yet. --- src/core/hle/service/apt/apt.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/core/hle/service/apt/apt.cpp') diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index ba66569b4..feb579778 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -12,6 +12,7 @@ #include "core/hle/service/apt/apt_a.h" #include "core/hle/service/apt/apt_s.h" #include "core/hle/service/apt/apt_u.h" +#include "core/hle/service/fs/archive.h" #include "core/hle/hle.h" #include "core/hle/kernel/event.h" @@ -380,6 +381,24 @@ void StartLibraryApplet(Service::Interface* self) { cmd_buff[1] = applet->Start(parameter).raw; } +void GetAppletInfo(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + auto app_id = static_cast(cmd_buff[1]); + + if (auto applet = HLE::Applets::Applet::Get(app_id)) { + // TODO(Subv): Get the title id for the current applet and write it in the response[2-3] + cmd_buff[1] = RESULT_SUCCESS.raw; + cmd_buff[4] = static_cast(Service::FS::MediaType::NAND); + cmd_buff[5] = 1; // Registered + cmd_buff[6] = 1; // Loaded + cmd_buff[7] = 0; // Applet Attributes + } else { + cmd_buff[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Applet, + ErrorSummary::NotFound, ErrorLevel::Status).raw; + } + LOG_WARNING(Service_APT, "(stubbed) called appid=%u", app_id); +} + void Init() { AddService(new APT_A_Interface); AddService(new APT_S_Interface); -- cgit v1.2.3