Module/Description instead of major_code/minor_code

This commit is contained in:
Liam Minopulos 2019-02-28 08:57:55 +01:00
parent 6b94e5ff99
commit 6bda3f1df8
2 changed files with 8 additions and 8 deletions

View File

@ -12,8 +12,8 @@
typedef struct { typedef struct {
bool custom_text; ///< Whether to show a custom error message. If this is false, a default message will be shown. bool custom_text; ///< Whether to show a custom error message. If this is false, a default message will be shown.
u8 pad[7]; u8 pad[7];
u32 major_code; ///< First part of the error-code. u32 module; ///< Module code.
u32 minor_code; ///< Second part of the error-code. u32 description; ///< Description code.
u8 pad2[8]; u8 pad2[8];
char short_description[0x800]; ///< Short description. char short_description[0x800]; ///< Short description.
char detailed_description[0x800]; ///< Detailed description (displayed when the user clicks, on "Details"). char detailed_description[0x800]; ///< Detailed description (displayed when the user clicks, on "Details").
@ -43,14 +43,14 @@ void errorShow(ErrorConfig* c);
* @param c ErrorConfig struct * @param c ErrorConfig struct
* @param code Code. * @param code Code.
*/ */
void errorConfigSetMajorCode(ErrorConfig* c, u32 code); void errorConfigSetModule(ErrorConfig* c, u32 code);
/** /**
* @brief Sets the second part of the error code. * @brief Sets the second part of the error code.
* @param c ErrorConfig struct * @param c ErrorConfig struct
* @param code Code. * @param code Code.
*/ */
void errorConfigSetMinorCode(ErrorConfig* c, u32 code); void errorConfigSetDescription(ErrorConfig* c, u32 code);
/** /**
* @brief Sets whether to use a custom error message. * @brief Sets whether to use a custom error message.

View File

@ -30,12 +30,12 @@ void errorShow(ErrorConfig* c) {
appletHolderClose(&err); appletHolderClose(&err);
} }
void errorConfigSetMajorCode(ErrorConfig* c, u32 code) { void errorConfigSetModule(ErrorConfig* c, u32 code) {
c->major_code = code; c->module = code;
} }
void errorConfigSetMinorCode(ErrorConfig* c, u32 code) { void errorConfigSetDescription(ErrorConfig* c, u32 code) {
c->minor_code = code; c->description = code;
} }
void errorConfigSetCustomText(ErrorConfig* c, bool custom_text) { void errorConfigSetCustomText(ErrorConfig* c, bool custom_text) {