diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-03-11 22:45:36 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-03-11 22:45:36 -0700 |
commit | 76460e8c2c33af185ae8641775d5673fcdab0759 (patch) | |
tree | 20b774948f8592e0834b9b55af79180463b06e58 /indra | |
parent | 37837edd69da48fe9ff74e69084e29c491327a78 (diff) |
Use LLCachedControl to speed up voice enable/disable checking
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 44e00b69e5..b9b8742c41 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -569,7 +569,9 @@ void LLVoiceClient::setMicGain(F32 gain) bool LLVoiceClient::voiceEnabled() { - return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice") && !gNonInteractive; + static LLCachedControl<bool> enable_voice_chat(gSavedSettings, "EnableVoiceChat"); + static LLCachedControl<bool> cmd_line_disable_voice(gSavedSettings, "CmdLineDisableVoice"); + return enable_voice_chat && !cmd_line_disable_voice && !gNonInteractive; } void LLVoiceClient::setVoiceEnabled(bool enabled) |