diff --git a/app/src/main/cpp/skyline/applet/error_applet.cpp b/app/src/main/cpp/skyline/applet/error_applet.cpp index e02f15d1..c5c0adf3 100644 --- a/app/src/main/cpp/skyline/applet/error_applet.cpp +++ b/app/src/main/cpp/skyline/applet/error_applet.cpp @@ -21,6 +21,9 @@ namespace skyline::applet { Logger::Debug("ErrorApplet: version: 0x{:X}, type: 0x{:X}", commonArg.apiVersion, errorCommonHeader.type); switch (errorCommonHeader.type) { + case ErrorType::ErrorCommonArg: + HandleErrorCommonArg(); + break; case ErrorType::ApplicationErrorArg: HandleApplicationErrorArg(); break; @@ -34,6 +37,11 @@ namespace skyline::applet { return {}; } + void ErrorApplet::HandleErrorCommonArg() { + auto errorCommonArg{errorStorage->GetSpan().as()}; + Logger::Error("ErrorApplet: error code: 0x{:X}, result: 0x{:X}", errorCommonArg.errorCode, errorCommonArg.result); + } + void ErrorApplet::HandleApplicationErrorArg() { auto applicationErrorStorage{errorStorage->GetSpan().as()}; diff --git a/app/src/main/cpp/skyline/applet/error_applet.h b/app/src/main/cpp/skyline/applet/error_applet.h index 5c676184..ea346ecb 100644 --- a/app/src/main/cpp/skyline/applet/error_applet.h +++ b/app/src/main/cpp/skyline/applet/error_applet.h @@ -41,6 +41,15 @@ namespace skyline::applet { }; static_assert(sizeof(ErrorCommonHeader) == 0x8); + /** + * @url https://switchbrew.org/wiki/Error_Applet#ErrorCommonArg + */ + struct ErrorCommonArg { + ErrorCommonHeader header; + u64 errorCode; + Result result; + }; + struct ApplicationErrorArg { ErrorCommonHeader commonHeader; u32 errorNumber; @@ -54,6 +63,8 @@ namespace skyline::applet { std::shared_ptr errorStorage; + void HandleErrorCommonArg(); + void HandleApplicationErrorArg(); public: