From 259e4a2be04a6736cb490956ae43391dfa8a583f Mon Sep 17 00:00:00 2001 From: Josh Bodner Date: Sun, 3 Apr 2022 16:29:45 -0700 Subject: [PATCH] Fix mapping not updating if CVar is changed in-game --- soh/src/code/code_800EC960.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/soh/src/code/code_800EC960.c b/soh/src/code/code_800EC960.c index 416bfb74a..23d1ba375 100644 --- a/soh/src/code/code_800EC960.c +++ b/soh/src/code/code_800EC960.c @@ -1248,9 +1248,8 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId); s32 Audio_SetGanonDistVol(u8 targetVol); // Function originally not called, so repurposing for DPad input -void func_800EC960(u8 custom) { - if (custom) { - osSyncPrintf("AUDIO : Ocarina Control Assign Normal\n"); +void func_800EC960(u8 dpad) { + if (dpad) { sOcarinaAllowedBtnMask = (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT | BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT); sOcarinaABtnMap = BTN_A; @@ -1258,6 +1257,13 @@ void func_800EC960(u8 custom) { sOcarinaCDownBtnMap = BTN_CDOWN | BTN_DDOWN; sOcarinaCLeftBtnMap = BTN_CLEFT | BTN_DLEFT; sOcarinaCRightBtnMap = BTN_CRIGHT | BTN_DRIGHT; + } else { + sOcarinaAllowedBtnMask = (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT); + sOcarinaABtnMap = BTN_A; + sOcarinaCUPBtnMap = BTN_CUP; + sOcarinaCDownBtnMap = BTN_CDOWN; + sOcarinaCLeftBtnMap = BTN_CLEFT; + sOcarinaCRightBtnMap = BTN_CRIGHT; } }