Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Menu Open Start Press" for 2/3 speed #714

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Run "cargo fmt"
austintraver committed Jan 5, 2025
commit f7a4b22af5f5854bf7fa5410f0221c23e77a7a66
6 changes: 3 additions & 3 deletions src/common/button_config.rs
Original file line number Diff line number Diff line change
@@ -240,7 +240,6 @@ pub fn combo_passes(combo: ButtonCombo) -> bool {
}

fn handle_menu_open_start_press(controller: &mut Controller) -> bool {

// If we press (-), open the modpack menu.
// Exception: If the vanilla menu is open, don't open the modpack menu.
if controller.current_buttons.minus() && !read(&VANILLA_MENU_ACTIVE) {
@@ -260,7 +259,6 @@ fn handle_menu_open_start_press(controller: &mut Controller) -> bool {
}

if controller.current_buttons.plus() {

assign(&START_RELEASE_FRAMES, 0);

// If the vanilla menu is open, we don't want to open the modpack menu.
@@ -294,7 +292,9 @@ fn handle_menu_open_start_press(controller: &mut Controller) -> bool {
// If the (+) button was held for 1-10 frames, then released,
// we should simulate a normal (+) button input, opening the vanilla menu.
if read(&START_HOLD_FRAMES) > 0 && read(&START_HOLD_FRAMES) < 10 {
if !read(&QUICK_MENU_ACTIVE) && frame_counter::get_frame_count(*MENU_CLOSE_FRAME_COUNTER) == 0 {
if !read(&QUICK_MENU_ACTIVE)
&& frame_counter::get_frame_count(*MENU_CLOSE_FRAME_COUNTER) == 0
{
// If we held for fewer than 10 frames, let's let the game know that
// we had pressed start
controller.current_buttons.set_plus(true);