Merge pull request #1909 from flagrama/fix-mute-audio-speed

Fix FPS not being limited when Audio muted
This commit is contained in:
zilmar 2021-02-02 12:12:01 +10:30 committed by GitHub
commit c93b1211e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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; }

View File

@ -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);
}