From cacc596722f764a865ffecfee0879df0f54ab6a9 Mon Sep 17 00:00:00 2001 From: Daryl Borth Date: Tue, 21 Aug 2018 08:38:50 -0600 Subject: [PATCH] disable sound sync (if enabled) when using turbo mode. fixes sound cutting off when using turbo. --- source/input.cpp | 12 +++++++++++- source/preferences.cpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/source/input.cpp b/source/input.cpp index 0f697d4..96f68a6 100644 --- a/source/input.cpp +++ b/source/input.cpp @@ -247,9 +247,12 @@ UpdatePads() * * Sets up userInput triggers for use ***************************************************************************/ +static bool soundSync = false; + void SetupPads() { + soundSync = Settings.SoundSync; PAD_Init(); #ifdef HW_RVL @@ -591,11 +594,18 @@ void ReportButtons () UpdatePads(); - Settings.TurboMode = Settings.Mute = ( + Settings.TurboMode = ( userInput[0].pad.substickX > 70 || userInput[0].WPAD_StickX(1) > 70 ); // RIGHT on c-stick and on classic controller right joystick + if(Settings.TurboMode) { + Settings.SoundSync = false; + } + else { + Settings.SoundSync = soundSync; + } + /* Check for menu: * CStick left * OR "L+R+X+Y" (eg. Homebrew/Adapted SNES controllers) diff --git a/source/preferences.cpp b/source/preferences.cpp index 2e03d5b..ba9b398 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -477,7 +477,7 @@ DefaultSettings () Settings.HDMATimingHack = 100; Settings.BlockInvalidVRAMAccessMaster = true; - // Sound defaults. On Wii this is 32Khz/16bit/Stereo + // Sound Settings.SoundSync = true; Settings.SixteenBitSound = true; Settings.Stereo = true;