summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp58
1 files changed, 1 insertions, 57 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index d8c8cb0461..fca8de7410 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -125,7 +125,7 @@ LLVoiceClient::LLVoiceClient(LLPumpIO *pump)
mPTTDirty(true),
mPTT(true),
mUsePTT(true),
- mPTTIsMiddleMouse(false),
+ mPTTMouseButton(0),
mPTTKey(0),
mPTTIsToggle(false),
mUserPTTState(false),
@@ -200,8 +200,6 @@ const LLVoiceVersionInfo LLVoiceClient::getVersion()
void LLVoiceClient::updateSettings()
{
setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled"));
- std::string keyString = gSavedSettings.getString("PushToTalkButton");
- setPTTKey(keyString);
setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle"));
mDisableMic = gSavedSettings.getBOOL("VoiceDisableMic");
@@ -637,23 +635,6 @@ bool LLVoiceClient::getPTTIsToggle()
return mPTTIsToggle;
}
-void LLVoiceClient::setPTTKey(std::string &key)
-{
- if(key == "MiddleMouse")
- {
- mPTTIsMiddleMouse = true;
- }
- else
- {
- mPTTIsMiddleMouse = false;
- if(!LLKeyboard::keyFromString(key, &mPTTKey))
- {
- // If the call failed, don't match any key.
- key = KEY_NONE;
- }
- }
-}
-
void LLVoiceClient::inputUserControlState(bool down)
{
if(mPTTIsToggle)
@@ -674,43 +655,6 @@ void LLVoiceClient::toggleUserPTTState(void)
setUserPTTState(!getUserPTTState());
}
-void LLVoiceClient::keyDown(KEY key, MASK mask)
-{
- if (gKeyboard->getKeyRepeated(key))
- {
- // ignore auto-repeat keys
- return;
- }
-
- if (!mPTTIsMiddleMouse && LLAgent::isActionAllowed("speak") && (key == mPTTKey))
- {
- bool down = gKeyboard->getKeyDown(mPTTKey);
- if (down)
- {
- inputUserControlState(down);
- }
- }
-
-}
-void LLVoiceClient::keyUp(KEY key, MASK mask)
-{
- if (!mPTTIsMiddleMouse && (key == mPTTKey))
- {
- bool down = gKeyboard->getKeyDown(mPTTKey);
- if (!down)
- {
- inputUserControlState(down);
- }
- }
-}
-void LLVoiceClient::middleMouseState(bool down)
-{
- if(mPTTIsMiddleMouse && LLAgent::isActionAllowed("speak"))
- {
- inputUserControlState(down);
- }
-}
-
//-------------------------------------------
// nearby speaker accessors