From 84dd4713a5d9ce2c73f0b4c92bfa600494e72313 Mon Sep 17 00:00:00 2001 From: Patrick12115 <115201185+Patrick12115@users.noreply.github.com> Date: Sat, 11 May 2024 14:44:49 -0400 Subject: [PATCH] No dropped inputs (#325) --- mm/2s2h/BenGui/BenMenuBar.cpp | 5 ++++- mm/src/audio/code_8019AF00.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index c4d38bd09..8bab22dfe 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -403,12 +403,15 @@ void DrawEnhancementsMenu() { ImGui::EndMenu(); } - if (UIWidgets::BeginMenu("Songs")) { + if (UIWidgets::BeginMenu("Songs/Playback")) { UIWidgets::CVarCheckbox("Enable Sun's Song", "gEnhancements.Songs.EnableSunsSong", { .tooltip = "Enables the partially implemented Sun's Song. RIGHT-DOWN-UP-RIGHT-DOWN-UP to play it. " "This song will make time move very fast until either Link moves to a different scene, " "or when the time switches to a new time period." }); + UIWidgets::CVarCheckbox("Prevent Dropped Ocarina Inputs", "gEnhancements.Playback.NoDropOcarinaInput", { + .tooltip = "Prevent dropping inputs when playing the ocarina quickly" + }); ImGui::EndMenu(); } diff --git a/mm/src/audio/code_8019AF00.c b/mm/src/audio/code_8019AF00.c index f5a8aaf25..85badd038 100644 --- a/mm/src/audio/code_8019AF00.c +++ b/mm/src/audio/code_8019AF00.c @@ -2588,7 +2588,9 @@ void AudioOcarina_PlayControllerInput(u8 isOcarinaSfxSuppressedWhenCancelled) { // Prevents two different ocarina notes from being played on two consecutive frames if ((sOcarinaFlags != 0) && (sOcarinaDropInputTimer != 0)) { sOcarinaDropInputTimer--; - return; + if (!CVarGetInteger("gEnhancements.Playback.NoDropOcarinaInput", 0)) { + return; + } } // Ensures the button pressed to start the ocarina does not also play an ocarina note