Added errorResultRecordShow/errorCodeRecordShow.

This commit is contained in:
yellows8 2019-03-27 23:32:44 -04:00
parent f6287086d3
commit 0ea16ae8c7
2 changed files with 32 additions and 1 deletions

View File

@ -142,6 +142,23 @@ Result errorEulaShow(SetRegion RegionCode);
*/
Result errorSystemUpdateEulaShow(SetRegion RegionCode, ErrorEulaData* eula);
/**
* @brief Launches the applet for displaying an error full-screen, using the specified Result and timestamp.
* @param res Result
* @param timestamp POSIX timestamp.
* @note Wrapper for \ref errorCodeRecordShow.
* @note The applet does not log an error report for this.
*/
Result errorResultRecordShow(Result res, u64 timestamp);
/**
* @brief Launches the applet for displaying an error full-screen, using the specified ErrorCode and timestamp.
* @param low The module portion of the error, normally this should be set to module + 2000.
* @param desc The error description.
* @note The applet does not log an error report for this.
*/
Result errorCodeRecordShow(u32 low, u32 desc, u64 timestamp);
/**
* @brief Creates an ErrorSystemConfig struct.
* @param c ErrorSystemConfig struct.

View File

@ -193,7 +193,21 @@ Result errorSystemUpdateEulaShow(SetRegion RegionCode, ErrorEulaData* eula) {
// Record
//TODO
Result errorResultRecordShow(Result res, u64 timestamp) {
return errorCodeRecordShow(2000 + R_MODULE(res), R_DESCRIPTION(res), timestamp);
}
Result errorCodeRecordShow(u32 low, u32 desc, u64 timestamp) {
ErrorRecordArg arg;
memset(&arg, 0, sizeof(arg));
arg.hdr.type = 5;
arg.hdr.jumpFlag = 1;
arg.errorCode = (u64)low | ((u64)desc<<32);
arg.timestamp = timestamp;
return _errorShow(&arg, sizeof(arg), NULL, 0);
}
// System