diff options
-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; |