From ea5d879160e36cab09abd44c8ed68a4008580f4a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 29 May 2020 09:45:06 -0400 Subject: OS_GetResetParameter --- arm9/lib/include/OS_reset.h | 5 +++++ arm9/src/main.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'arm9') 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; -- cgit v1.2.3