From c13561e5ba4db120578cce0e726b7605f8f3f505 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Aug 2022 18:15:06 +0200 Subject: [PATCH] simplified filed controls code for debug menu --- src/field_control_avatar.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 5f8712980..e2bc06e98 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -132,31 +132,10 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) input->dpadDirection = DIR_EAST; #if TX_DEBUG_SYSTEM == TRUE && TX_DEBUG_SYSTEM_IN_MENU == FALSE - if (heldKeys & R_BUTTON) + if ((heldKeys & R_BUTTON) && input->pressedStartButton) { - if (input->pressedSelectButton) - { - input->input_field_1_0 = TRUE; - input->pressedSelectButton = FALSE; - } - else if (input->pressedStartButton) - { - input->input_field_1_2 = TRUE; - input->pressedStartButton = FALSE; - } - } - if (heldKeys & L_BUTTON) - { - if (input->pressedSelectButton) - { - input->input_field_1_1 = TRUE; - input->pressedSelectButton = FALSE; - } - else if (input->pressedStartButton) - { - input->input_field_1_3 = TRUE; - input->pressedStartButton = FALSE; - } + input->input_field_1_2 = TRUE; + input->pressedStartButton = FALSE; } #endif }