diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-31 03:01:01 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-31 03:01:01 -0400 |
| commit | c3e530625e06a3d406d91d020dcc26f4aa29ee64 (patch) | |
| tree | 819f472a0de0643b4ab20b2f02ad5fb9b81aa656 /src/core | |
| parent | b40ad217ab829226841cb71f6e4c5cb05977a225 (diff) | |
am: reply with data for IApplicationFunctions 320 and 321
Switch 2 titles call 320 and 321 during nn::oe::Initialize. 320 replies with
two bytes and 321 with one; the handlers replied with none, leaving the
caller to read stale message words. Answer zero.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/am/service/application_functions.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/am/service/application_functions.h | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index 37dfbfa344..5eb501d3f0 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -571,15 +571,18 @@ Result IApplicationFunctions::GetOperationModeRefreshEvent( R_SUCCEED(); } -Result IApplicationFunctions::Unknown320() { - // Called by Switch 2 titles during nn::oe::Initialize; arguments unknown. +Result IApplicationFunctions::Unknown320(Out<u16> out) { + // Called by Switch 2 titles during nn::oe::Initialize. It returns two bytes of data (meaning + // unknown); a reply without them left the caller reading stale message words. LOG_WARNING(Service_AM, "(STUBBED) called"); + *out = 0; R_SUCCEED(); } -Result IApplicationFunctions::Unknown321() { - // Called by Switch 2 titles right after 320; arguments unknown. +Result IApplicationFunctions::Unknown321(Out<u8> out) { + // Called by Switch 2 titles right after 320; returns one byte (meaning unknown). LOG_WARNING(Service_AM, "(STUBBED) called"); + *out = 0; R_SUCCEED(); } diff --git a/src/core/hle/service/am/service/application_functions.h b/src/core/hle/service/am/service/application_functions.h index 44b5fadff0..aca2f8c694 100644 --- a/src/core/hle/service/am/service/application_functions.h +++ b/src/core/hle/service/am/service/application_functions.h @@ -83,8 +83,8 @@ private: Result GetHealthWarningDisappearedSystemEvent(OutCopyHandle<Kernel::KReadableEvent> out_event); Result CreateApplicationAndRequestToStart(u64 application_id); Result GetOperationModeRefreshEvent(OutCopyHandle<Kernel::KReadableEvent> out_event); - Result Unknown320(); - Result Unknown321(); + Result Unknown320(Out<u16> out); + Result Unknown321(Out<u8> out); Result Unknown330(Out<u8> out); Result PrepareForJit(); |
