Merge pull request #3587 from valentinvanelslande/apt-fmt
Service/APT: Migrate logging macros
This commit is contained in:
commit
dfe9b4edf8
@ -32,8 +32,8 @@ void Module::Interface::Initialize(Kernel::HLERequestContext& ctx) {
|
|||||||
AppletId app_id = rp.PopEnum<AppletId>();
|
AppletId app_id = rp.PopEnum<AppletId>();
|
||||||
u32 attributes = rp.Pop<u32>();
|
u32 attributes = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id=0x%08X, attributes=0x%08X", static_cast<u32>(app_id),
|
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}, attributes={:#010X}",
|
||||||
attributes);
|
static_cast<u32>(app_id), attributes);
|
||||||
|
|
||||||
auto result = apt->applet_manager->Initialize(app_id, attributes);
|
auto result = apt->applet_manager->Initialize(app_id, attributes);
|
||||||
if (result.Failed()) {
|
if (result.Failed()) {
|
||||||
@ -197,10 +197,10 @@ void Module::Interface::GetSharedFont(Kernel::HLERequestContext& ctx) {
|
|||||||
if (apt->LoadSharedFont()) {
|
if (apt->LoadSharedFont()) {
|
||||||
apt->shared_font_loaded = true;
|
apt->shared_font_loaded = true;
|
||||||
} else if (apt->LoadLegacySharedFont()) {
|
} else if (apt->LoadLegacySharedFont()) {
|
||||||
LOG_WARNING(Service_APT, "Loaded shared font by legacy method");
|
NGLOG_WARNING(Service_APT, "Loaded shared font by legacy method");
|
||||||
apt->shared_font_loaded = true;
|
apt->shared_font_loaded = true;
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_APT, "shared font file missing - go dump it from your 3ds");
|
NGLOG_ERROR(Service_APT, "shared font file missing - go dump it from your 3ds");
|
||||||
rb.Push<u32>(-1); // TODO: Find the right error code
|
rb.Push<u32>(-1); // TODO: Find the right error code
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
rb.PushCopyObjects<Kernel::Object>(nullptr);
|
rb.PushCopyObjects<Kernel::Object>(nullptr);
|
||||||
@ -231,7 +231,7 @@ void Module::Interface::NotifyToWait(Kernel::HLERequestContext& ctx) {
|
|||||||
u32 app_id = rp.Pop<u32>();
|
u32 app_id = rp.Pop<u32>();
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) app_id=%u", app_id);
|
NGLOG_WARNING(Service_APT, "(STUBBED) app_id={}", app_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetLockHandle(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetLockHandle(Kernel::HLERequestContext& ctx) {
|
||||||
@ -252,14 +252,14 @@ void Module::Interface::GetLockHandle(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push<u32>(0); // Least significant bit = power button state
|
rb.Push<u32>(0); // Least significant bit = power button state
|
||||||
rb.PushCopyObjects(apt->lock);
|
rb.PushCopyObjects(apt->lock);
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called applet_attributes=0x%08X", applet_attributes);
|
NGLOG_WARNING(Service_APT, "(STUBBED) called applet_attributes={:#010X}", applet_attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::Enable(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::Enable(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp(ctx, 0x3, 1, 0); // 0x30040
|
IPC::RequestParser rp(ctx, 0x3, 1, 0); // 0x30040
|
||||||
u32 attributes = rp.Pop<u32>();
|
u32 attributes = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called attributes=0x%08X", attributes);
|
NGLOG_DEBUG(Service_APT, "called attributes={:#010X}", attributes);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(apt->applet_manager->Enable(attributes));
|
rb.Push(apt->applet_manager->Enable(attributes));
|
||||||
@ -275,7 +275,7 @@ void Module::Interface::GetAppletManInfo(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push(static_cast<u32>(AppletId::HomeMenu)); // Home menu AppID
|
rb.Push(static_cast<u32>(AppletId::HomeMenu)); // Home menu AppID
|
||||||
rb.Push(static_cast<u32>(AppletId::Application)); // TODO(purpasmart96): Do this correctly
|
rb.Push(static_cast<u32>(AppletId::Application)); // TODO(purpasmart96): Do this correctly
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X", unk);
|
NGLOG_WARNING(Service_APT, "(STUBBED) called unk={:#010X}", unk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::IsRegistered(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::IsRegistered(Kernel::HLERequestContext& ctx) {
|
||||||
@ -285,7 +285,7 @@ void Module::Interface::IsRegistered(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push(apt->applet_manager->IsRegistered(app_id));
|
rb.Push(apt->applet_manager->IsRegistered(app_id));
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id=0x%08X", static_cast<u32>(app_id));
|
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}", static_cast<u32>(app_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::InquireNotification(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::InquireNotification(Kernel::HLERequestContext& ctx) {
|
||||||
@ -294,7 +294,7 @@ void Module::Interface::InquireNotification(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push(static_cast<u32>(SignalType::None)); // Signal type
|
rb.Push(static_cast<u32>(SignalType::None)); // Signal type
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X", app_id);
|
NGLOG_WARNING(Service_APT, "(STUBBED) called app_id={:#010X}", app_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
|
||||||
@ -306,9 +306,9 @@ void Module::Interface::SendParameter(Kernel::HLERequestContext& ctx) {
|
|||||||
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
|
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
|
||||||
std::vector<u8> buffer = rp.PopStaticBuffer();
|
std::vector<u8> buffer = rp.PopStaticBuffer();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT,
|
NGLOG_DEBUG(Service_APT,
|
||||||
"called src_app_id=0x%08X, dst_app_id=0x%08X, signal_type=0x%08X,"
|
"called src_app_id={:#010X}, dst_app_id={:#010X}, signal_type={:#010X},"
|
||||||
"buffer_size=0x%08X",
|
"buffer_size={:#010X}",
|
||||||
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
|
static_cast<u32>(src_app_id), static_cast<u32>(dst_app_id),
|
||||||
static_cast<u32>(signal_type), buffer_size);
|
static_cast<u32>(signal_type), buffer_size);
|
||||||
|
|
||||||
@ -329,8 +329,8 @@ void Module::Interface::ReceiveParameter(Kernel::HLERequestContext& ctx) {
|
|||||||
AppletId app_id = rp.PopEnum<AppletId>();
|
AppletId app_id = rp.PopEnum<AppletId>();
|
||||||
u32 buffer_size = rp.Pop<u32>();
|
u32 buffer_size = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id=0x%08X, buffer_size=0x%08X", static_cast<u32>(app_id),
|
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
|
||||||
buffer_size);
|
static_cast<u32>(app_id), buffer_size);
|
||||||
|
|
||||||
auto next_parameter = apt->applet_manager->ReceiveParameter(app_id);
|
auto next_parameter = apt->applet_manager->ReceiveParameter(app_id);
|
||||||
|
|
||||||
@ -357,8 +357,8 @@ void Module::Interface::GlanceParameter(Kernel::HLERequestContext& ctx) {
|
|||||||
AppletId app_id = rp.PopEnum<AppletId>();
|
AppletId app_id = rp.PopEnum<AppletId>();
|
||||||
u32 buffer_size = rp.Pop<u32>();
|
u32 buffer_size = rp.Pop<u32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called app_id=0x%08X, buffer_size=0x%08X", static_cast<u32>(app_id),
|
NGLOG_DEBUG(Service_APT, "called app_id={:#010X}, buffer_size={:#010X}",
|
||||||
buffer_size);
|
static_cast<u32>(app_id), buffer_size);
|
||||||
|
|
||||||
auto next_parameter = apt->applet_manager->GlanceParameter(app_id);
|
auto next_parameter = apt->applet_manager->GlanceParameter(app_id);
|
||||||
|
|
||||||
@ -393,9 +393,9 @@ void Module::Interface::CancelParameter(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push(apt->applet_manager->CancelParameter(check_sender, sender_appid, check_receiver,
|
rb.Push(apt->applet_manager->CancelParameter(check_sender, sender_appid, check_receiver,
|
||||||
receiver_appid));
|
receiver_appid));
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT,
|
NGLOG_DEBUG(Service_APT,
|
||||||
"called check_sender=%u, sender_appid=0x%08X, "
|
"called check_sender={}, sender_appid={:#010X}, "
|
||||||
"check_receiver=%u, receiver_appid=0x%08X",
|
"check_receiver={}, receiver_appid={:#010X}",
|
||||||
check_sender, static_cast<u32>(sender_appid), check_receiver,
|
check_sender, static_cast<u32>(sender_appid), check_receiver,
|
||||||
static_cast<u32>(receiver_appid));
|
static_cast<u32>(receiver_appid));
|
||||||
}
|
}
|
||||||
@ -415,9 +415,10 @@ void Module::Interface::PrepareToStartApplication(Kernel::HLERequestContext& ctx
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT,
|
NGLOG_WARNING(
|
||||||
"(STUBBED) called title_info1=0x%08X, title_info2=0x%08X, title_info3=0x%08X,"
|
Service_APT,
|
||||||
"title_info4=0x%08X, flags=0x%08X",
|
"(STUBBED) called title_info1={:#010X}, title_info2={:#010X}, title_info3={:#010X},"
|
||||||
|
"title_info4={:#010X}, flags={:#010X}",
|
||||||
title_info1, title_info2, title_info3, title_info4, flags);
|
title_info1, title_info2, title_info3, title_info4, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,8 +433,8 @@ void Module::Interface::StartApplication(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT,
|
NGLOG_WARNING(Service_APT,
|
||||||
"(STUBBED) called buffer1_size=0x%08X, buffer2_size=0x%08X, flag=0x%08X",
|
"(STUBBED) called buffer1_size={:#010X}, buffer2_size={:#010X}, flag={:#010X}",
|
||||||
buffer1_size, buffer2_size, flag);
|
buffer1_size, buffer2_size, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,8 +450,8 @@ void Module::Interface::AppletUtility(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT,
|
NGLOG_WARNING(Service_APT,
|
||||||
"(STUBBED) called command=0x%08X, input_size=0x%08X, output_size=0x%08X",
|
"(STUBBED) called command={:#010X}, input_size={:#010X}, output_size={:#010X}",
|
||||||
utility_command, input_size, output_size);
|
utility_command, input_size, output_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,13 +461,14 @@ void Module::Interface::SetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
|||||||
apt->cpu_percent = rp.Pop<u32>();
|
apt->cpu_percent = rp.Pop<u32>();
|
||||||
|
|
||||||
if (value != 1) {
|
if (value != 1) {
|
||||||
LOG_ERROR(Service_APT, "This value should be one, but is actually %u!", value);
|
NGLOG_ERROR(Service_APT, "This value should be one, but is actually {}!", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called cpu_percent=%u, value=%u", apt->cpu_percent, value);
|
NGLOG_WARNING(Service_APT, "(STUBBED) called, cpu_percent={}, value={}", apt->cpu_percent,
|
||||||
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
||||||
@ -474,21 +476,21 @@ void Module::Interface::GetAppCpuTimeLimit(Kernel::HLERequestContext& ctx) {
|
|||||||
u32 value = rp.Pop<u32>();
|
u32 value = rp.Pop<u32>();
|
||||||
|
|
||||||
if (value != 1) {
|
if (value != 1) {
|
||||||
LOG_ERROR(Service_APT, "This value should be one, but is actually %u!", value);
|
NGLOG_ERROR(Service_APT, "This value should be one, but is actually {}!", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push(apt->cpu_percent);
|
rb.Push(apt->cpu_percent);
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called value=%u", value);
|
NGLOG_WARNING(Service_APT, "(STUBBED) called, value={}", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::PrepareToStartLibraryApplet(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::PrepareToStartLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp(ctx, 0x18, 1, 0); // 0x180040
|
IPC::RequestParser rp(ctx, 0x18, 1, 0); // 0x180040
|
||||||
AppletId applet_id = rp.PopEnum<AppletId>();
|
AppletId applet_id = rp.PopEnum<AppletId>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called applet_id=%08X", static_cast<u32>(applet_id));
|
NGLOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(apt->applet_manager->PrepareToStartLibraryApplet(applet_id));
|
rb.Push(apt->applet_manager->PrepareToStartLibraryApplet(applet_id));
|
||||||
@ -505,14 +507,14 @@ void Module::Interface::PrepareToStartNewestHomeMenu(Kernel::HLERequestContext&
|
|||||||
rb.Push(ResultCode(ErrorDescription::AlreadyExists, ErrorModule::Applet,
|
rb.Push(ResultCode(ErrorDescription::AlreadyExists, ErrorModule::Applet,
|
||||||
ErrorSummary::InvalidState, ErrorLevel::Status));
|
ErrorSummary::InvalidState, ErrorLevel::Status));
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called");
|
NGLOG_DEBUG(Service_APT, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::PreloadLibraryApplet(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::PreloadLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp(ctx, 0x16, 1, 0); // 0x160040
|
IPC::RequestParser rp(ctx, 0x16, 1, 0); // 0x160040
|
||||||
AppletId applet_id = rp.PopEnum<AppletId>();
|
AppletId applet_id = rp.PopEnum<AppletId>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called applet_id=%08X", static_cast<u32>(applet_id));
|
NGLOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(apt->applet_manager->PreloadLibraryApplet(applet_id));
|
rb.Push(apt->applet_manager->PreloadLibraryApplet(applet_id));
|
||||||
@ -525,7 +527,7 @@ void Module::Interface::FinishPreloadingLibraryApplet(Kernel::HLERequestContext&
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(apt->applet_manager->FinishPreloadingLibraryApplet(applet_id));
|
rb.Push(apt->applet_manager->FinishPreloadingLibraryApplet(applet_id));
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called applet_id=%03X", static_cast<u32>(applet_id));
|
NGLOG_WARNING(Service_APT, "(STUBBED) called, applet_id={:#05X}", static_cast<u32>(applet_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||||
@ -536,7 +538,7 @@ void Module::Interface::StartLibraryApplet(Kernel::HLERequestContext& ctx) {
|
|||||||
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
|
Kernel::SharedPtr<Kernel::Object> object = rp.PopGenericObject();
|
||||||
std::vector<u8> buffer = rp.PopStaticBuffer();
|
std::vector<u8> buffer = rp.PopStaticBuffer();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called applet_id=%08X", static_cast<u32>(applet_id));
|
NGLOG_DEBUG(Service_APT, "called, applet_id={:08X}", static_cast<u32>(applet_id));
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(apt->applet_manager->StartLibraryApplet(applet_id, object, buffer));
|
rb.Push(apt->applet_manager->StartLibraryApplet(applet_id, object, buffer));
|
||||||
@ -549,7 +551,7 @@ void Module::Interface::CancelLibraryApplet(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push<u32>(1); // TODO: Find the return code meaning
|
rb.Push<u32>(1); // TODO: Find the return code meaning
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called exiting=%d", exiting);
|
NGLOG_WARNING(Service_APT, "(STUBBED) called exiting={}", exiting);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
|
||||||
@ -580,7 +582,7 @@ void Module::Interface::SetScreenCapPostPermission(Kernel::HLERequestContext& ct
|
|||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) screen_capture_post_permission=%u",
|
NGLOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
|
||||||
static_cast<u32>(apt->screen_capture_post_permission));
|
static_cast<u32>(apt->screen_capture_post_permission));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,7 +592,7 @@ void Module::Interface::GetScreenCapPostPermission(Kernel::HLERequestContext& ct
|
|||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push(static_cast<u32>(apt->screen_capture_post_permission));
|
rb.Push(static_cast<u32>(apt->screen_capture_post_permission));
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) screen_capture_post_permission=%u",
|
NGLOG_WARNING(Service_APT, "(STUBBED) called, screen_capture_post_permission={}",
|
||||||
static_cast<u32>(apt->screen_capture_post_permission));
|
static_cast<u32>(apt->screen_capture_post_permission));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,7 +600,7 @@ void Module::Interface::GetAppletInfo(Kernel::HLERequestContext& ctx) {
|
|||||||
IPC::RequestParser rp(ctx, 0x6, 1, 0); // 0x60040
|
IPC::RequestParser rp(ctx, 0x6, 1, 0); // 0x60040
|
||||||
auto app_id = rp.PopEnum<AppletId>();
|
auto app_id = rp.PopEnum<AppletId>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called appid=%u", static_cast<u32>(app_id));
|
NGLOG_DEBUG(Service_APT, "called, app_id={}", static_cast<u32>(app_id));
|
||||||
|
|
||||||
auto info = apt->applet_manager->GetAppletInfo(app_id);
|
auto info = apt->applet_manager->GetAppletInfo(app_id);
|
||||||
if (info.Failed()) {
|
if (info.Failed()) {
|
||||||
@ -621,16 +623,17 @@ void Module::Interface::GetStartupArgument(Kernel::HLERequestContext& ctx) {
|
|||||||
StartupArgumentType startup_argument_type = static_cast<StartupArgumentType>(rp.Pop<u8>());
|
StartupArgumentType startup_argument_type = static_cast<StartupArgumentType>(rp.Pop<u8>());
|
||||||
|
|
||||||
if (parameter_size >= 0x300) {
|
if (parameter_size >= 0x300) {
|
||||||
LOG_ERROR(
|
NGLOG_ERROR(
|
||||||
Service_APT,
|
Service_APT,
|
||||||
"Parameter size is outside the valid range (capped to 0x300): parameter_size=0x%08x",
|
"Parameter size is outside the valid range (capped to 0x300): parameter_size={:#010X}",
|
||||||
parameter_size);
|
parameter_size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<u8> parameter(parameter_size, 0);
|
std::vector<u8> parameter(parameter_size, 0);
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(stubbed) called startup_argument_type=%u , parameter_size=0x%08x",
|
NGLOG_WARNING(Service_APT,
|
||||||
|
"(STUBBED) called, startup_argument_type={}, parameter_size={:#010X}",
|
||||||
static_cast<u32>(startup_argument_type), parameter_size);
|
static_cast<u32>(startup_argument_type), parameter_size);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
||||||
@ -655,7 +658,8 @@ void Module::Interface::Wrap(Kernel::HLERequestContext& ctx) {
|
|||||||
ASSERT_MSG(output_size == input_size + HW::AES::CCM_MAC_SIZE,
|
ASSERT_MSG(output_size == input_size + HW::AES::CCM_MAC_SIZE,
|
||||||
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called, output_size=%u, input_size=%u, nonce_offset=%u, nonce_size=%u",
|
NGLOG_DEBUG(Service_APT,
|
||||||
|
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
|
||||||
output_size, input_size, nonce_offset, nonce_size);
|
output_size, input_size, nonce_offset, nonce_size);
|
||||||
|
|
||||||
// Note: This weird nonce size modification is verified against real 3DS
|
// Note: This weird nonce size modification is verified against real 3DS
|
||||||
@ -700,7 +704,8 @@ void Module::Interface::Unwrap(Kernel::HLERequestContext& ctx) {
|
|||||||
ASSERT_MSG(output_size == input_size - HW::AES::CCM_MAC_SIZE,
|
ASSERT_MSG(output_size == input_size - HW::AES::CCM_MAC_SIZE,
|
||||||
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
"input_size ({}) doesn't match to output_size ({})", input_size, output_size);
|
||||||
|
|
||||||
LOG_DEBUG(Service_APT, "called, output_size=%u, input_size=%u, nonce_offset=%u, nonce_size=%u",
|
NGLOG_DEBUG(Service_APT,
|
||||||
|
"called, output_size={}, input_size={}, nonce_offset={}, nonce_size={}",
|
||||||
output_size, input_size, nonce_offset, nonce_size);
|
output_size, input_size, nonce_offset, nonce_size);
|
||||||
|
|
||||||
// Note: This weird nonce size modification is verified against real 3DS
|
// Note: This weird nonce size modification is verified against real 3DS
|
||||||
@ -725,7 +730,7 @@ void Module::Interface::Unwrap(Kernel::HLERequestContext& ctx) {
|
|||||||
pdata.size() - nonce_offset);
|
pdata.size() - nonce_offset);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(Service_APT, "Failed to decrypt data");
|
NGLOG_ERROR(Service_APT, "Failed to decrypt data");
|
||||||
rb.Push(ResultCode(static_cast<ErrorDescription>(1), ErrorModule::PS,
|
rb.Push(ResultCode(static_cast<ErrorDescription>(1), ErrorModule::PS,
|
||||||
ErrorSummary::WrongArgument, ErrorLevel::Status));
|
ErrorSummary::WrongArgument, ErrorLevel::Status));
|
||||||
}
|
}
|
||||||
@ -746,7 +751,7 @@ void Module::Interface::CheckNew3DSApp(Kernel::HLERequestContext& ctx) {
|
|||||||
PTM::CheckNew3DS(rb);
|
PTM::CheckNew3DS(rb);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called");
|
NGLOG_WARNING(Service_APT, "(STUBBED) called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
|
||||||
@ -755,7 +760,7 @@ void Module::Interface::CheckNew3DS(Kernel::HLERequestContext& ctx) {
|
|||||||
|
|
||||||
PTM::CheckNew3DS(rb);
|
PTM::CheckNew3DS(rb);
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called");
|
NGLOG_WARNING(Service_APT, "(STUBBED) called");
|
||||||
}
|
}
|
||||||
|
|
||||||
Module::Interface::Interface(std::shared_ptr<Module> apt, const char* name, u32 max_session)
|
Module::Interface::Interface(std::shared_ptr<Module> apt, const char* name, u32 max_session)
|
||||||
|
Loading…
Reference in New Issue
Block a user