mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 06:57:57 -05:00
Merge pull request #1266 from Subv/miiapplet
HLE/Applets: Implemented a dummy Mii Selector applet.
This commit is contained in:
@ -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/kernel/event.h"
|
||||
#include "core/hle/kernel/mutex.h"
|
||||
@ -378,6 +379,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<AppletId>(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<u32>(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);
|
||||
|
@ -54,7 +54,7 @@ enum class AppletId : u32 {
|
||||
Notifications = 0x116,
|
||||
Miiverse = 0x117,
|
||||
SoftwareKeyboard1 = 0x201,
|
||||
Ed = 0x202,
|
||||
Ed1 = 0x202,
|
||||
PnoteApp = 0x204,
|
||||
SnoteApp = 0x205,
|
||||
Error = 0x206,
|
||||
@ -64,6 +64,7 @@ enum class AppletId : u32 {
|
||||
Application = 0x300,
|
||||
AnyLibraryApplet = 0x400,
|
||||
SoftwareKeyboard2 = 0x401,
|
||||
Ed2 = 0x402,
|
||||
};
|
||||
|
||||
/// Send a parameter to the currently-running application, which will read it via ReceiveParameter
|
||||
@ -132,6 +133,20 @@ void Enable(Service::Interface* self);
|
||||
*/
|
||||
void GetAppletManInfo(Service::Interface* self);
|
||||
|
||||
/**
|
||||
* APT::GetAppletInfo service function.
|
||||
* Inputs:
|
||||
* 1 : AppId
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2-3 : Title ID
|
||||
* 4 : Media Type
|
||||
* 5 : Registered
|
||||
* 6 : Loaded
|
||||
* 7 : Attributes
|
||||
*/
|
||||
void GetAppletInfo(Service::Interface* self);
|
||||
|
||||
/**
|
||||
* APT::IsRegistered service function. This returns whether the specified AppID is registered with NS yet.
|
||||
* An AppID is "registered" once the process associated with the AppID uses APT:Enable. Home Menu uses this
|
||||
|
@ -14,7 +14,7 @@ const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x00030040, Enable, "Enable"},
|
||||
{0x00040040, nullptr, "Finalize"},
|
||||
{0x00050040, GetAppletManInfo, "GetAppletManInfo"},
|
||||
{0x00060040, nullptr, "GetAppletInfo"},
|
||||
{0x00060040, GetAppletInfo, "GetAppletInfo"},
|
||||
{0x00070000, nullptr, "GetLastSignaledAppletId"},
|
||||
{0x00080000, nullptr, "CountRegisteredApplet"},
|
||||
{0x00090040, IsRegistered, "IsRegistered"},
|
||||
|
Reference in New Issue
Block a user