diff options
author | Oz Linden <oz@lindenlab.com> | 2016-05-06 10:28:42 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2016-05-06 10:28:42 -0400 |
commit | 950c41d184b340a7a3370c2cbda5d1eed9a17b0b (patch) | |
tree | 373912394af6834d7d56258becf46954244b8423 /indra/newview/llvoiceclient.cpp | |
parent | 20198b750d02c769ab6845226f98ce6e5dd1f20b (diff) | |
parent | 7f5e6cea124e1193b199a3eabd50bdab96340c13 (diff) |
merge 4.0.4-release and MAINT-5974
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 56c0910983..5c125a236a 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -657,19 +657,25 @@ void LLVoiceClient::keyDown(KEY key, MASK mask) return; } - if(!mPTTIsMiddleMouse && LLAgent::isActionAllowed("speak")) + if (!mPTTIsMiddleMouse && LLAgent::isActionAllowed("speak") && (key == mPTTKey)) { - bool down = (mPTTKey != KEY_NONE) && gKeyboard->getKeyDown(mPTTKey); - if (down) { inputUserControlState(down); } + bool down = gKeyboard->getKeyDown(mPTTKey); + if (down) + { + inputUserControlState(down); + } } } void LLVoiceClient::keyUp(KEY key, MASK mask) { - if(!mPTTIsMiddleMouse) + if (!mPTTIsMiddleMouse && (key == mPTTKey)) { - bool down = (mPTTKey != KEY_NONE) && gKeyboard->getKeyDown(mPTTKey); - if (down) { inputUserControlState(down); } + bool down = gKeyboard->getKeyDown(mPTTKey); + if (!down) + { + inputUserControlState(down); + } } } void LLVoiceClient::middleMouseState(bool down) |