From dd8c49c04b3ed02657568afcda58ad94cb636226 Mon Sep 17 00:00:00 2001 From: jugeeya Date: Wed, 23 Aug 2023 09:39:07 -0700 Subject: [PATCH] Initial --- src/common/button_config.rs | 4 ++++ src/common/menu.rs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/button_config.rs b/src/common/button_config.rs index a9079a8..3f45f8a 100644 --- a/src/common/button_config.rs +++ b/src/common/button_config.rs @@ -168,6 +168,10 @@ pub fn handle_final_input_mapping(player_idx: i32, controller_struct: &mut SomeC } *start_hold_frames = 0; } + + if p1_controller.current_buttons.minus() { + *start_menu_request = true; + } } let button_combo_requests = &mut *BUTTON_COMBO_REQUESTS.lock(); diff --git a/src/common/menu.rs b/src/common/menu.rs index 951bf0a..60c25f4 100644 --- a/src/common/menu.rs +++ b/src/common/menu.rs @@ -206,7 +206,9 @@ pub fn handle_final_input_mapping( EVENT_QUEUE.push(Event::menu_open(menu_json)); } }); - button_mapping(ButtonConfig::PLUS, style, button_presses).then(|| { + (button_mapping(ButtonConfig::PLUS, style, button_presses) + || button_mapping(ButtonConfig::MINUS, style, button_presses)) + .then(|| { received_input = true; // Leave menu. frame_counter::start_counting(FRAME_COUNTER_INDEX);