diff --git a/src/common/button_config.rs b/src/common/button_config.rs index f6993e1..f188abc 100644 --- a/src/common/button_config.rs +++ b/src/common/button_config.rs @@ -246,28 +246,30 @@ pub fn handle_final_input_mapping(player_idx: i32, controller_struct: &mut SomeC p1_controller.current_buttons.set_plus(false); p1_controller.just_down.set_plus(false); p1_controller.just_release.set_plus(false); + if *start_hold_frames >= 10 && unsafe { !VANILLA_MENU_ACTIVE } { + // If we've held for more than 10 frames, + // let's open the training mod menu + start_menu_request = true; + } } else { - if *start_hold_frames > 0 && menu_close_wait_frame == 0 { - // Here, we just finished holding start - if *start_hold_frames < 10 - && unsafe { !VANILLA_MENU_ACTIVE } - && menu_close_wait_frame == 0 - { - // If we held for fewer than 10 frames, let's open the training mod menu - start_menu_request = true; - } else if unsafe { !QUICK_MENU_ACTIVE } { - // Otherwise, let's let the game know that we had pressed start - // So long as our menu isn't active - p1_controller.current_buttons.set_plus(true); - p1_controller.just_down.set_plus(true); - unsafe { - VANILLA_MENU_ACTIVE = true; - } + // Here, we just finished holding start + if *start_hold_frames > 0 + && *start_hold_frames < 10 + && unsafe { !QUICK_MENU_ACTIVE } + && menu_close_wait_frame == 0 + { + // If we held for fewer than 10 frames, let's let the game know that + // we had pressed start + p1_controller.current_buttons.set_plus(true); + p1_controller.just_down.set_plus(true); + unsafe { + VANILLA_MENU_ACTIVE = true; } } *start_hold_frames = 0; } + // If we ever press minus, open the mod menu if p1_controller.current_buttons.minus() { start_menu_request = true; } diff --git a/src/lib.rs b/src/lib.rs index c158430..dcbb0c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,7 +121,7 @@ pub fn main() { notification( "Open Menu".to_string(), if MENU.menu_open_start_press == OnOff::On { - "Start".to_string() + "Hold Start".to_string() } else { DEFAULT_OPEN_MENU_CONFIG.to_string() }, diff --git a/training_mod_consts/src/lib.rs b/training_mod_consts/src/lib.rs index 8db3fca..f1b2e16 100644 --- a/training_mod_consts/src/lib.rs +++ b/training_mod_consts/src/lib.rs @@ -355,7 +355,7 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu { button_tab.add_submenu_with_toggles::( "Menu Open Start Press".to_string(), "menu_open_start_press".to_string(), - "Menu Open Start Press: Press start to open the mod menu. To open the original menu, hold start.\nThe default menu open option is always available as Hold B + Press DPad Up.".to_string(), + "Menu Open Start Press: Hold start or press minus to open the mod menu. To open the original menu, press start.\nThe default menu open option is always available as Hold DPad Up + Press B.".to_string(), true, &(menu.menu_open_start_press as u32), );