From a3374165301138ea9638483444268fdf4933df42 Mon Sep 17 00:00:00 2001 From: cadmic Date: Fri, 2 Feb 2024 10:33:00 -0800 Subject: [PATCH] Match retail code_800D31A0.c (#1698) --- include/variables.h | 2 ++ src/code/code_800D31A0.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/variables.h b/include/variables.h index 58104dc90c..f0fa2b9fe8 100644 --- a/include/variables.h +++ b/include/variables.h @@ -103,7 +103,9 @@ extern s32 gScreenWidth; extern s32 gScreenHeight; extern Mtx gMtxClear; extern MtxF gMtxFClear; +#if OOT_DEBUG extern u32 gIsCtrlr2Valid; +#endif extern s16* gWaveSamples[9]; extern f32 gBendPitchOneOctaveFrequencies[256]; extern f32 gBendPitchTwoSemitonesFrequencies[256]; diff --git a/src/code/code_800D31A0.c b/src/code/code_800D31A0.c index 7109fa9c2f..b4e0495e13 100644 --- a/src/code/code_800D31A0.c +++ b/src/code/code_800D31A0.c @@ -1,15 +1,18 @@ #include "global.h" #include "terminal.h" +#if OOT_DEBUG u32 gIsCtrlr2Valid = false; +#endif NORETURN void func_800D31A0(void) { PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST); - while (true) { + for (;;) { Sleep_Msec(1000); } } +#if OOT_DEBUG void func_800D31F0(void) { gIsCtrlr2Valid = (gPadMgr.validCtrlrsMask & 2) != 0; } @@ -17,3 +20,4 @@ void func_800D31F0(void) { void func_800D3210(void) { gIsCtrlr2Valid = false; } +#endif