diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-29 09:45:06 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-29 09:45:06 -0400 |
commit | ea5d879160e36cab09abd44c8ed68a4008580f4a (patch) | |
tree | f6752d033c1f424dc3552d269d078bb062660bbc | |
parent | 1095493c4f8aa2ae6b8103cb516ffcb92b0b65e4 (diff) |
OS_GetResetParameter
-rw-r--r-- | arm9/lib/include/OS_reset.h | 5 | ||||
-rw-r--r-- | arm9/src/main.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/arm9/lib/include/OS_reset.h b/arm9/lib/include/OS_reset.h index c50106da..8616ed78 100644 --- a/arm9/lib/include/OS_reset.h +++ b/arm9/lib/include/OS_reset.h @@ -17,4 +17,9 @@ static void OSi_CommonCallback(PXIFifoTag tag, u32 data, BOOL err); static void OSi_SendToPxi(u16 data); void OS_ResetSystem(u32 parameter); +static inline u32 OS_GetResetParameter(void) +{ + return (u32)*(u32 *)HW_RESET_PARAMETER_BUF; +} + #endif //POKEDIAMOND_OS_RESET_H diff --git a/arm9/src/main.c b/arm9/src/main.c index e7898c32..44f4127a 100644 --- a/arm9/src/main.c +++ b/arm9/src/main.c @@ -85,7 +85,7 @@ THUMB_FUNC void NitroMain(void) } else { - switch (*((s32 *)HW_RESET_PARAMETER_BUF)) + switch (OS_GetResetParameter()) { case 0: gBacklightTop.unk1C = 0; |