diff options
Diffstat (limited to 'linden/indra/newview/llviewercontrol.cpp')
-rw-r--r-- | linden/indra/newview/llviewercontrol.cpp | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 98d19bc..7a30b22 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "lldrawpoolterrain.h" | 43 | #include "lldrawpoolterrain.h" |
44 | #include "llflexibleobject.h" | 44 | #include "llflexibleobject.h" |
45 | #include "llfeaturemanager.h" | 45 | #include "llfeaturemanager.h" |
46 | #include "llglslshader.h" | 46 | #include "llviewershadermgr.h" |
47 | #include "llnetmap.h" | 47 | #include "llnetmap.h" |
48 | #include "llpanelgeneral.h" | 48 | #include "llpanelgeneral.h" |
49 | #include "llpanelinput.h" | 49 | #include "llpanelinput.h" |
@@ -76,14 +76,14 @@ BOOL gHackGodmode = FALSE; | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | 78 | ||
79 | std::map<LLString, LLControlGroup*> gSettings; | 79 | std::map<std::string, LLControlGroup*> gSettings; |
80 | LLControlGroup gSavedSettings; // saved at end of session | 80 | LLControlGroup gSavedSettings; // saved at end of session |
81 | LLControlGroup gSavedPerAccountSettings; // saved at end of session | 81 | LLControlGroup gSavedPerAccountSettings; // saved at end of session |
82 | LLControlGroup gColors; // read-only | 82 | LLControlGroup gColors; // read-only |
83 | LLControlGroup gCrashSettings; // saved at end of session | 83 | LLControlGroup gCrashSettings; // saved at end of session |
84 | 84 | ||
85 | LLString gLastRunVersion; | 85 | std::string gLastRunVersion; |
86 | LLString gCurrentVersion; | 86 | std::string gCurrentVersion; |
87 | 87 | ||
88 | extern BOOL gResizeScreenTexture; | 88 | extern BOOL gResizeScreenTexture; |
89 | extern BOOL gDebugGL; | 89 | extern BOOL gDebugGL; |
@@ -114,7 +114,7 @@ static bool handleTerrainDetailChanged(const LLSD& newvalue) | |||
114 | 114 | ||
115 | static bool handleSetShaderChanged(const LLSD& newvalue) | 115 | static bool handleSetShaderChanged(const LLSD& newvalue) |
116 | { | 116 | { |
117 | LLShaderMgr::setShaders(); | 117 | LLViewerShaderMgr::instance()->setShaders(); |
118 | return true; | 118 | return true; |
119 | } | 119 | } |
120 | 120 | ||
@@ -141,6 +141,12 @@ static bool handleAvatarLODChanged(const LLSD& newvalue) | |||
141 | return true; | 141 | return true; |
142 | } | 142 | } |
143 | 143 | ||
144 | static bool handleAvatarMaxVisibleChanged(const LLSD& newvalue) | ||
145 | { | ||
146 | LLVOAvatar::sMaxVisible = (U32) newvalue.asInteger(); | ||
147 | return true; | ||
148 | } | ||
149 | |||
144 | static bool handleTerrainLODChanged(const LLSD& newvalue) | 150 | static bool handleTerrainLODChanged(const LLSD& newvalue) |
145 | { | 151 | { |
146 | LLVOSurfacePatch::sLODFactor = (F32)newvalue.asReal(); | 152 | LLVOSurfacePatch::sLODFactor = (F32)newvalue.asReal(); |
@@ -271,7 +277,7 @@ static bool handleAudioStreamMusicChanged(const LLSD& newvalue) | |||
271 | // otherwise music will briefly stop | 277 | // otherwise music will briefly stop |
272 | if ( !gAudiop->isInternetStreamPlaying() ) | 278 | if ( !gAudiop->isInternetStreamPlaying() ) |
273 | { | 279 | { |
274 | gAudiop->startInternetStream(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL().c_str()); | 280 | gAudiop->startInternetStream(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL()); |
275 | } | 281 | } |
276 | } | 282 | } |
277 | } | 283 | } |
@@ -385,7 +391,7 @@ static bool handleDebugViewsChanged(const LLSD& newvalue) | |||
385 | static bool handleLogFileChanged(const LLSD& newvalue) | 391 | static bool handleLogFileChanged(const LLSD& newvalue) |
386 | { | 392 | { |
387 | std::string log_filename = newvalue.asString(); | 393 | std::string log_filename = newvalue.asString(); |
388 | LLFile::remove(log_filename.c_str()); | 394 | LLFile::remove(log_filename); |
389 | LLError::logToFile(log_filename); | 395 | LLError::logToFile(log_filename); |
390 | return true; | 396 | return true; |
391 | } | 397 | } |
@@ -418,22 +424,7 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) | |||
418 | { | 424 | { |
419 | if(gVoiceClient) | 425 | if(gVoiceClient) |
420 | { | 426 | { |
421 | // Note: Ignore the specific event value, look up the ones we want | 427 | gVoiceClient->updateSettings(); |
422 | |||
423 | gVoiceClient->setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); | ||
424 | gVoiceClient->setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); | ||
425 | std::string keyString = gSavedSettings.getString("PushToTalkButton"); | ||
426 | gVoiceClient->setPTTKey(keyString); | ||
427 | gVoiceClient->setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); | ||
428 | gVoiceClient->setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); | ||
429 | std::string serverName = gSavedSettings.getString("VivoxDebugServerName"); | ||
430 | gVoiceClient->setVivoxDebugServerName(serverName); | ||
431 | |||
432 | std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); | ||
433 | gVoiceClient->setCaptureDevice(inputDevice); | ||
434 | std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); | ||
435 | gVoiceClient->setRenderDevice(outputDevice); | ||
436 | gVoiceClient->setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); | ||
437 | } | 428 | } |
438 | return true; | 429 | return true; |
439 | } | 430 | } |
@@ -454,6 +445,7 @@ void settings_setup_listeners() | |||
454 | gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 445 | gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
455 | gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 446 | gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
456 | gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); | 447 | gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); |
448 | gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _1)); | ||
457 | gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1)); | 449 | gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1)); |
458 | gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1)); | 450 | gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1)); |
459 | gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1)); | 451 | gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1)); |
@@ -686,4 +678,5 @@ void test_cached_control() | |||
686 | 678 | ||
687 | if((std::string)test_BrowserHomePage != "http://www.secondlife.com") llerrs << "Fail BrowserHomePage" << llendl; | 679 | if((std::string)test_BrowserHomePage != "http://www.secondlife.com") llerrs << "Fail BrowserHomePage" << llendl; |
688 | } | 680 | } |
689 | #endif // TEST_CACHED_CONTROL \ No newline at end of file | 681 | #endif // TEST_CACHED_CONTROL |
682 | |||