From 3faa1c6acce3b317ee23f153d17f0ea66a8f1c79 Mon Sep 17 00:00:00 2001 From: cadmic Date: Fri, 6 Sep 2024 01:24:19 -0700 Subject: Move button macros to include/controller.h (#2138) * Move button macros to include/controller.h * Fix z_mag button ordering --- src/code/fault_n64.c | 2 +- src/code/z_debug.c | 2 +- src/code/z_frame_advance.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/code') diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c index 5a8dd9d1d..92fd0cc8d 100644 --- a/src/code/fault_n64.c +++ b/src/code/fault_n64.c @@ -109,7 +109,7 @@ void Fault_WaitForInputImpl(void) { Fault_SleepImpl(0x10); PadMgr_RequestPadData(&gPadMgr, inputs, 0); btnPress = inputs[0].press.button; - } while (!CHECK_BTN_ANY(btnPress, (BTN_A | BTN_B | BTN_START | BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_CUP))); + } while (!CHECK_BTN_ANY(btnPress, (BTN_A | BTN_B | BTN_START | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT))); } void Fault_WaitForInput(void) { diff --git a/src/code/z_debug.c b/src/code/z_debug.c index d668f490a..963e934ff 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -168,7 +168,7 @@ void Regs_UpdateEditor(Input* input) { s32 increment; s32 i; - dPadInputCur = input->cur.button & (BTN_DUP | BTN_DLEFT | BTN_DRIGHT | BTN_DDOWN); + dPadInputCur = input->cur.button & (BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT); if (CHECK_BTN_ALL(input->cur.button, BTN_L) || CHECK_BTN_ALL(input->cur.button, BTN_R) || CHECK_BTN_ALL(input->cur.button, BTN_START)) { diff --git a/src/code/z_frame_advance.c b/src/code/z_frame_advance.c index 64404fb2f..486717a50 100644 --- a/src/code/z_frame_advance.c +++ b/src/code/z_frame_advance.c @@ -2,6 +2,7 @@ #include "stdbool.h" +#include "controller.h" #include "padmgr.h" #include "macros.h" -- cgit v1.2.3