hle: Eliminate need to specify command headers for IPC. (#6678)
This commit is contained in:
@@ -16,7 +16,7 @@ Module::Interface::Interface(std::shared_ptr<Module> act, const char* name)
|
||||
Module::Interface::~Interface() = default;
|
||||
|
||||
void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x1, 2, 4); // 0x10084
|
||||
IPC::RequestParser rp(ctx);
|
||||
const auto sdk_version = rp.Pop<u32>();
|
||||
const auto shared_memory_size = rp.Pop<u32>();
|
||||
const auto caller_pid = rp.PopPID();
|
||||
@@ -31,7 +31,7 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
||||
}
|
||||
|
||||
void Module::Interface::GetAccountDataBlock(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x6, 3, 2); // 0x600C2
|
||||
IPC::RequestParser rp(ctx);
|
||||
const auto unknown = rp.Pop<u8>();
|
||||
const auto size = rp.Pop<u32>();
|
||||
const auto block_id = rp.Pop<u32>();
|
||||
|
||||
@@ -11,16 +11,16 @@ ACT_A::ACT_A(std::shared_ptr<Module> act) : Module::Interface(std::move(act), "a
|
||||
const FunctionInfo functions[] = {
|
||||
// act:u shared commands
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 4), &ACT_A::Initialize, "Initialize"},
|
||||
{IPC::MakeHeader(0x0002, 1, 0), nullptr, "GetErrorCode"},
|
||||
{IPC::MakeHeader(0x0006, 3, 2), &ACT_A::GetAccountDataBlock, "GetAccountDataBlock"},
|
||||
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "AcquireEulaList"},
|
||||
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GenerateUuid"},
|
||||
{0x0001, &ACT_A::Initialize, "Initialize"},
|
||||
{0x0002, nullptr, "GetErrorCode"},
|
||||
{0x0006, &ACT_A::GetAccountDataBlock, "GetAccountDataBlock"},
|
||||
{0x000B, nullptr, "AcquireEulaList"},
|
||||
{0x000D, nullptr, "GenerateUuid"},
|
||||
// act:a
|
||||
{IPC::MakeHeader(0x0413, 3, 2), nullptr, "UpdateMiiImage"},
|
||||
{IPC::MakeHeader(0x041B, 5, 2), nullptr, "AgreeEula"},
|
||||
{IPC::MakeHeader(0x0421, 1, 2), nullptr, "UploadMii"},
|
||||
{IPC::MakeHeader(0x0423, 2, 2), nullptr, "ValidateMailAddress"},
|
||||
{0x0413, nullptr, "UpdateMiiImage"},
|
||||
{0x041B, nullptr, "AgreeEula"},
|
||||
{0x0421, nullptr, "UploadMii"},
|
||||
{0x0423, nullptr, "ValidateMailAddress"},
|
||||
// clang-format on
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
|
||||
@@ -10,11 +10,11 @@ namespace Service::ACT {
|
||||
ACT_U::ACT_U(std::shared_ptr<Module> act) : Module::Interface(std::move(act), "act:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
{IPC::MakeHeader(0x0001, 2, 4), &ACT_U::Initialize, "Initialize"},
|
||||
{IPC::MakeHeader(0x0002, 1, 0), nullptr, "GetErrorCode"},
|
||||
{IPC::MakeHeader(0x0006, 3, 2), &ACT_U::GetAccountDataBlock, "GetAccountDataBlock"},
|
||||
{IPC::MakeHeader(0x000B, 1, 2), nullptr, "AcquireEulaList"},
|
||||
{IPC::MakeHeader(0x000D, 1, 0), nullptr, "GenerateUuid"},
|
||||
{0x0001, &ACT_U::Initialize, "Initialize"},
|
||||
{0x0002, nullptr, "GetErrorCode"},
|
||||
{0x0006, &ACT_U::GetAccountDataBlock, "GetAccountDataBlock"},
|
||||
{0x000B, nullptr, "AcquireEulaList"},
|
||||
{0x000D, nullptr, "GenerateUuid"},
|
||||
// clang-format on
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
|
||||
Reference in New Issue
Block a user