From e4c85c5cb7a76bf9ad99e7ede65c9769dc5b494f Mon Sep 17 00:00:00 2001 From: Frank-74 Date: Thu, 17 Jan 2019 04:33:06 +0000 Subject: [PATCH 1/2] Fix typo, extra bracket I did the PR on the website instead of through Github Desktop. Made a typo. --- Source/Project64-audio/AudioSettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Project64-audio/AudioSettings.cpp b/Source/Project64-audio/AudioSettings.cpp index b136e79d3..4844d8b04 100644 --- a/Source/Project64-audio/AudioSettings.cpp +++ b/Source/Project64-audio/AudioSettings.cpp @@ -163,7 +163,7 @@ void CSettings::ReadSettings(void) m_FPSBuffer = GetSetting(Set_FPSBuffer) != 0; m_FullSpeed = m_Set_FullSpeed ? GetSystemSetting(m_Set_FullSpeed) != 0 : false; - m_SyncAudio = ((!m_advanced_options || bLimitFPS); + m_SyncAudio = (!m_advanced_options || bLimitFPS); if (m_Set_log_dir != 0) { From 52aaf57097eee19761a2f686d45ab154b7d6fca6 Mon Sep 17 00:00:00 2001 From: Frank-74 Date: Thu, 17 Jan 2019 04:40:28 +0000 Subject: [PATCH 2/2] remove unreferenced SyncAudio from ReadSettings --- Source/Project64-audio/AudioSettings.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Project64-audio/AudioSettings.cpp b/Source/Project64-audio/AudioSettings.cpp index 4844d8b04..34ca1a721 100644 --- a/Source/Project64-audio/AudioSettings.cpp +++ b/Source/Project64-audio/AudioSettings.cpp @@ -82,8 +82,8 @@ CSettings::~CSettings() void CSettings::RegisterSettings(void) { SetModuleName("default"); - m_Set_SyncViaAudioEnabled = FindSystemSettingId("SyncViaAudioEnabled"); - m_Set_EnableAudio = FindSystemSettingId("Enable Audio"); + m_Set_SyncViaAudioEnabled = FindSystemSettingId("SyncViaAudioEnabled"); + m_Set_EnableAudio = FindSystemSettingId("Enable Audio"); m_Set_FixedAudio = FindSystemSettingId("Fixed Audio"); m_Set_SyncAudio = FindSystemSettingId("Sync Audio"); m_Set_FullSpeed = FindSystemSettingId("Full Speed"); @@ -108,10 +108,10 @@ void CSettings::RegisterSettings(void) void CSettings::SetSyncViaAudioEnabled(bool Enabled) { - if (m_Set_SyncViaAudioEnabled != 0) - { - SetSystemSetting(m_Set_SyncViaAudioEnabled, Enabled ? 1 : 0); - } + if (m_Set_SyncViaAudioEnabled != 0) + { + SetSystemSetting(m_Set_SyncViaAudioEnabled, Enabled ? 1 : 0); + } } void CSettings::SetAudioEnabled(bool Enabled) @@ -152,7 +152,6 @@ void CSettings::LogLevelChanged(void) void CSettings::ReadSettings(void) { - bool SyncAudio = m_Set_SyncAudio ? GetSystemSetting(m_Set_SyncAudio) != 0 : false; bool bLimitFPS = m_Set_LimitFPS ? GetSystemSetting(m_Set_LimitFPS) != 0 : true; m_Volume = GetSetting(Set_Volume);