From f5af8f5261b04cbd204b606eccb6e192ed1319e2 Mon Sep 17 00:00:00 2001 From: Vincent Cunningham Date: Mon, 1 Feb 2021 20:31:45 -0500 Subject: [PATCH] Fix games not being FPS limited when Audio is muted --- Source/Project64-core/Plugins/PluginClass.cpp | 4 ++++ Source/Project64-core/Settings/GameSettings.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Project64-core/Plugins/PluginClass.cpp b/Source/Project64-core/Plugins/PluginClass.cpp index 845c9ebe4..2da69b926 100644 --- a/Source/Project64-core/Plugins/PluginClass.cpp +++ b/Source/Project64-core/Plugins/PluginClass.cpp @@ -413,6 +413,10 @@ void CPlugins::ConfigPlugin(void* hParent, PLUGIN_TYPE Type) } } m_Audio->DllConfig(hParent); + if (g_BaseSystem) + { + g_BaseSystem->RefreshSyncToAudio(); + } break; case PLUGIN_TYPE_CONTROLLER: if (m_Control == NULL || m_Control->DllConfig == NULL) { break; } diff --git a/Source/Project64-core/Settings/GameSettings.cpp b/Source/Project64-core/Settings/GameSettings.cpp index 0c9bd24be..7abb02006 100644 --- a/Source/Project64-core/Settings/GameSettings.cpp +++ b/Source/Project64-core/Settings/GameSettings.cpp @@ -94,5 +94,5 @@ void CGameSettings::SpeedChanged(int SpeedLimit) void CGameSettings::RefreshSyncToAudio(void) { - m_bSyncToAudio = g_Settings->LoadBool(Game_SyncViaAudio) && g_Settings->LoadBool(Setting_SyncViaAudioEnabled); + m_bSyncToAudio = g_Settings->LoadBool(Game_SyncViaAudio) && g_Settings->LoadBool(Setting_SyncViaAudioEnabled) && g_Settings->LoadBool(Plugin_EnableAudio); }