summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
commitc6d752b880cacca8fb8f10f28790a50161fcb9ab (patch)
tree14910a69597962134f2e78e864a2f05962a16356 /indra/newview/llstartup.cpp
parent76101843c0d390c25a783f212eb1ea75e508ada4 (diff)
parent7d87e41bbd5d4761b1eb17e49b7a00b948d84213 (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into gltf-dev-maint-a-merge
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp189
1 files changed, 85 insertions, 104 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 486b652f07..78276a170e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -40,10 +40,6 @@
#include "llviewermedia_streamingaudio.h"
#include "llaudioengine.h"
-#ifdef LL_FMODSTUDIO
-# include "llaudioengine_fmodstudio.h"
-#endif
-
#ifdef LL_OPENAL
#include "llaudioengine_openal.h"
#endif
@@ -549,7 +545,7 @@ bool idle_startup()
LLVersionInfo::instance().getMajor(),
LLVersionInfo::instance().getMinor(),
LLVersionInfo::instance().getPatch(),
- FALSE,
+ false,
std::string(),
responder,
failure_is_fatal,
@@ -620,7 +616,7 @@ bool idle_startup()
F32 xfer_throttle_bps = gSavedSettings.getF32("XferThrottle");
if (xfer_throttle_bps > 1.f)
{
- gXferManager->setUseAckThrottling(TRUE);
+ gXferManager->setUseAckThrottling(true);
gXferManager->setAckThrottleBPS(xfer_throttle_bps);
}
gAssetStorage = new LLViewerAssetStorage(msg, gXferManager);
@@ -634,13 +630,13 @@ bool idle_startup()
if (inBandwidth != 0.f)
{
LL_DEBUGS("AppInit") << "Setting packetring incoming bandwidth to " << inBandwidth << LL_ENDL;
- msg->mPacketRing.setUseInThrottle(TRUE);
+ msg->mPacketRing.setUseInThrottle(true);
msg->mPacketRing.setInBandwidth(inBandwidth);
}
if (outBandwidth != 0.f)
{
LL_DEBUGS("AppInit") << "Setting packetring outgoing bandwidth to " << outBandwidth << LL_ENDL;
- msg->mPacketRing.setUseOutThrottle(TRUE);
+ msg->mPacketRing.setUseOutThrottle(true);
msg->mPacketRing.setOutBandwidth(outBandwidth);
}
}
@@ -652,20 +648,11 @@ bool idle_startup()
// or audio cues in connection UI.
//-------------------------------------------------
- if (FALSE == gSavedSettings.getBOOL("NoAudio"))
+ if (false == gSavedSettings.getBOOL("NoAudio"))
{
delete gAudiop;
gAudiop = NULL;
-#ifdef LL_FMODSTUDIO
-#if !LL_WINDOWS
- if (NULL == getenv("LL_BAD_FMODSTUDIO_DRIVER"))
-#endif // !LL_WINDOWS
- {
- gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODSTUDIO(gSavedSettings.getBOOL("FMODExProfilerEnable"));
- }
-#endif
-
#ifdef LL_OPENAL
#if !LL_WINDOWS
if (NULL == getenv("LL_BAD_OPENAL_DRIVER"))
@@ -686,21 +673,10 @@ bool idle_startup()
#endif
if (gAudiop->init(window_handle, LLAppViewer::instance()->getSecondLifeTitle()))
{
- if (FALSE == gSavedSettings.getBOOL("UseMediaPluginsForStreamingAudio"))
- {
- LL_INFOS("AppInit") << "Using default impl to render streaming audio" << LL_ENDL;
- gAudiop->setStreamingAudioImpl(gAudiop->createDefaultStreamingAudioImpl());
- }
+ LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
+ gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
- // if the audio engine hasn't set up its own preferred handler for streaming audio
- // then set up the generic streaming audio implementation which uses media plugins
- if (NULL == gAudiop->getStreamingAudioImpl())
- {
- LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
- gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
- }
-
- gAudiop->setMuted(TRUE);
+ gAudiop->setMuted(true);
}
else
{
@@ -728,15 +704,15 @@ bool idle_startup()
// Previous initializeLoginInfo may have generated user credentials. Re-check them.
if (gUserCredential.isNull())
{
- show_connect_box = TRUE;
+ show_connect_box = true;
}
else if (gSavedSettings.getBOOL("AutoLogin"))
{
// Log into last account
gRememberPassword = true;
gRememberUser = true;
- gSavedSettings.setBOOL("RememberPassword", TRUE);
- gSavedSettings.setBOOL("RememberUser", TRUE);
+ gSavedSettings.setBOOL("RememberPassword", true);
+ gSavedSettings.setBOOL("RememberUser", true);
show_connect_box = false;
}
else if (gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
@@ -750,7 +726,7 @@ bool idle_startup()
{
gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
gRememberUser = gSavedSettings.getBOOL("RememberUser");
- show_connect_box = TRUE;
+ show_connect_box = true;
}
//setup map of datetime strings to codes and slt & local time offset from utc
@@ -759,7 +735,7 @@ bool idle_startup()
// Go to the next startup state
LLStartUp::setStartupState( STATE_BROWSER_INIT );
- return FALSE;
+ return false;
}
@@ -771,7 +747,7 @@ bool idle_startup()
display_startup();
// LLViewerMedia::initBrowser();
LLStartUp::setStartupState( STATE_LOGIN_SHOW );
- return FALSE;
+ return false;
}
@@ -813,7 +789,7 @@ bool idle_startup()
gUserCredential = gLoginHandler.initializeLoginInfo();
}
// Make sure the process dialog doesn't hide things
- gViewerWindow->setShowProgress(FALSE);
+ gViewerWindow->setShowProgress(false);
// Show the login dialog
login_show();
// connect dialog is already shown, so fill in the names
@@ -843,9 +819,9 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
- gViewerWindow->setNormalControlsVisible( FALSE );
- gLoginMenuBarView->setVisible( TRUE );
- gLoginMenuBarView->setEnabled( TRUE );
+ gViewerWindow->setNormalControlsVisible( false );
+ gLoginMenuBarView->setVisible( true );
+ gLoginMenuBarView->setEnabled( true );
show_debug_menus();
// Hide the splash screen
@@ -866,7 +842,7 @@ bool idle_startup()
#endif
display_startup();
timeout.reset();
- return FALSE;
+ return false;
}
if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
@@ -882,7 +858,7 @@ bool idle_startup()
// display() function will be the one to run display_startup()
// Sleep so we don't spin the CPU
ms_sleep(1);
- return FALSE;
+ return false;
}
if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
@@ -898,7 +874,7 @@ bool idle_startup()
// could then change the preferences to fix the issue.
LLStartUp::setStartupState(STATE_LOGIN_SHOW);
- return FALSE;
+ return false;
}
// reset the values that could have come in from a slurl
@@ -1043,14 +1019,14 @@ bool idle_startup()
// Display the startup progress bar.
gViewerWindow->initTextures(agent_location_id);
- gViewerWindow->setShowProgress(TRUE);
- gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Quit"));
+ gViewerWindow->setShowProgress(true);
+ gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Quit"));
gViewerWindow->revealIntroPanel();
LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
- return FALSE;
+ return false;
}
if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
@@ -1076,7 +1052,7 @@ bool idle_startup()
login->connect(gUserCredential);
LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK );
- return FALSE;
+ return false;
}
if(STATE_LOGIN_CURL_UNSTUCK == LLStartUp::getStartupState())
@@ -1087,7 +1063,7 @@ bool idle_startup()
set_startup_status(progress, auth_desc, auth_message);
LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
- return FALSE;
+ return false;
}
if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
@@ -1205,7 +1181,7 @@ bool idle_startup()
general_cert_done);
reset_login();
- gSavedSettings.setBOOL("AutoLogin", FALSE);
+ gSavedSettings.setBOOL("AutoLogin", false);
show_connect_box = true;
}
if(certificate)
@@ -1232,7 +1208,7 @@ bool idle_startup()
general_cert_done);
reset_login();
- gSavedSettings.setBOOL("AutoLogin", FALSE);
+ gSavedSettings.setBOOL("AutoLogin", false);
show_connect_box = true;
}
@@ -1276,10 +1252,10 @@ bool idle_startup()
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
transition_back_to_login_panel(emsg.str());
show_connect_box = true;
- return FALSE;
+ return false;
}
}
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1301,7 +1277,7 @@ bool idle_startup()
// Since we connected, save off the settings so the user doesn't have to
// type the name/password again if we crash.
- gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
+ gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true);
LLUIColorTable::instance().saveUserSettings();
display_startup();
@@ -1382,7 +1358,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT );
- return FALSE;
+ return false;
}
@@ -1395,7 +1371,7 @@ bool idle_startup()
LLStartUp::multimediaInit();
LLStartUp::setStartupState( STATE_FONT_INIT );
display_startup();
- return FALSE;
+ return false;
}
// Loading fonts takes several seconds
@@ -1404,7 +1380,7 @@ bool idle_startup()
LLStartUp::fontInit();
LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1458,7 +1434,7 @@ bool idle_startup()
}
}
display_startup();
- return FALSE;
+ return false;
}
@@ -1483,10 +1459,10 @@ bool idle_startup()
if ( gViewerWindow != NULL)
{ // This isn't the first logon attempt, so show the UI
- gViewerWindow->setNormalControlsVisible( TRUE );
+ gViewerWindow->setNormalControlsVisible( true );
}
- gLoginMenuBarView->setVisible( FALSE );
- gLoginMenuBarView->setEnabled( FALSE );
+ gLoginMenuBarView->setVisible( false );
+ gLoginMenuBarView->setEnabled( false );
display_startup();
// direct logging to the debug console's line buffer
@@ -1511,7 +1487,7 @@ bool idle_startup()
display_startup();
#ifndef LL_RELEASE_FOR_DOWNLOAD
- gMessageSystem->setTimeDecodes( TRUE ); // Time the decode of each msg
+ gMessageSystem->setTimeDecodes( true ); // Time the decode of each msg
gMessageSystem->setTimeDecodesSpamThreshold( 0.05f ); // Spam if a single msg takes over 50ms to decode
#endif
display_startup();
@@ -1628,7 +1604,7 @@ bool idle_startup()
gUseCircuitCallbackCalled = false;
- msg->enableCircuit(gFirstSim, TRUE);
+ msg->enableCircuit(gFirstSim, true);
// now, use the circuit info to tell simulator about us!
LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << gFirstSim << " with code " << msg->mOurCircuitCode << LL_ENDL;
msg->newMessageFast(_PREHASH_UseCircuitCode);
@@ -1639,7 +1615,7 @@ bool idle_startup()
msg->sendReliable(
gFirstSim,
gSavedSettings.getS32("UseCircuitCodeMaxRetries"),
- FALSE,
+ false,
(F32Seconds)gSavedSettings.getF32("UseCircuitCodeTimeout"),
use_circuit_callback,
NULL);
@@ -1647,7 +1623,7 @@ bool idle_startup()
timeout.reset();
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1662,7 +1638,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_AGENT_SEND );
}
pump_idle_startup_network();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1692,7 +1668,7 @@ bool idle_startup()
// But not on first login, because you can't see your avatar then
if (!gAgent.isFirstLogin())
{
- LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
+ LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
LLHUDManager::getInstance()->sendEffects();
@@ -1702,7 +1678,7 @@ bool idle_startup()
timeout.reset();
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1753,7 +1729,7 @@ bool idle_startup()
}
reset_login();
}
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1807,7 +1783,7 @@ bool idle_startup()
display_startup();
LLStartUp::setStartupState(STATE_INVENTORY_SKEL);
display_startup();
- return FALSE;
+ return false;
}
if (STATE_INVENTORY_SKEL == LLStartUp::getStartupState())
@@ -1839,7 +1815,7 @@ bool idle_startup()
display_startup();
LLStartUp::setStartupState(STATE_INVENTORY_SEND2);
display_startup();
- return FALSE;
+ return false;
}
if (STATE_INVENTORY_SEND2 == LLStartUp::getStartupState())
@@ -1919,7 +1895,7 @@ bool idle_startup()
// visible. JC
if (show_hud || gSavedSettings.getBOOL("ShowTutorial"))
{
- LLFloaterReg::showInstance("hud", LLSD(), FALSE);
+ LLFloaterReg::showInstance("hud", LLSD(), false);
}
display_startup();
@@ -1956,7 +1932,7 @@ bool idle_startup()
LLStartUp::setStartupState(STATE_INVENTORY_CALLBACKS );
display_startup();
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------
@@ -1967,7 +1943,7 @@ bool idle_startup()
if (!LLInventoryModel::isSysFoldersReady())
{
display_startup();
- return FALSE;
+ return false;
}
LLInventoryModelBackgroundFetch::instance().start();
LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@@ -2013,7 +1989,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_MISC );
display_startup();
- return FALSE;
+ return false;
}
@@ -2053,12 +2029,12 @@ bool idle_startup()
if (gSavedSettings.getBOOL("ShowHelpOnFirstLogin"))
{
- gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+ gSavedSettings.setBOOL("HelpFloaterOpen", true);
}
// Set the show start location to true, now that the user has logged
// on with this install.
- gSavedSettings.setBOOL("ShowStartLocation", TRUE);
+ gSavedSettings.setBOOL("ShowStartLocation", true);
}
display_startup();
@@ -2080,7 +2056,7 @@ bool idle_startup()
display_startup();
// We're successfully logged in.
- gSavedSettings.setBOOL("FirstLoginThisInstall", FALSE);
+ gSavedSettings.setBOOL("FirstLoginThisInstall", false);
LLFloaterReg::showInitialVisibleInstances();
@@ -2114,8 +2090,8 @@ bool idle_startup()
if (item_id.notNull() && asset_id.notNull())
{
// Could schedule and delay these for later.
- const BOOL no_inform_server = FALSE;
- const BOOL no_deactivate_similar = FALSE;
+ const bool no_inform_server = false;
+ const bool no_deactivate_similar = false;
LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id,
no_inform_server,
no_deactivate_similar);
@@ -2128,7 +2104,7 @@ bool idle_startup()
LLGestureMgr::instance().setFetchIDs(item_ids);
LLGestureMgr::instance().startFetch();
}
- gDisplaySwapBuffers = TRUE;
+ gDisplaySwapBuffers = true;
display_startup();
LLMessageSystem* msg = gMessageSystem;
@@ -2171,13 +2147,13 @@ bool idle_startup()
&& gSavedSettings.getBOOL("RestoreCameraPosOnLogin"))
{
// restore old camera pos
- gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
+ gAgentCamera.setFocusOnAvatar(false, false);
gAgentCamera.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null);
- BOOL limit_hit = FALSE;
+ bool limit_hit = false;
gAgentCamera.calcCameraPositionTargetGlobal(&limit_hit);
if (limit_hit)
{
- gAgentCamera.setFocusOnAvatar(TRUE, FALSE);
+ gAgentCamera.setFocusOnAvatar(true, false);
}
gAgentCamera.stopCameraAnimation();
}
@@ -2214,7 +2190,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_PRECACHE );
timeout.reset();
- return FALSE;
+ return false;
}
if (STATE_PRECACHE == LLStartUp::getStartupState())
@@ -2240,7 +2216,7 @@ bool idle_startup()
if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isOutfitChosen())
{
gAgentWearables.notifyLoadingStarted();
- gAgent.setOutfitChosen(TRUE);
+ gAgent.setOutfitChosen(true);
gAgentWearables.sendDummyAgentWearablesUpdate();
callAfterCOFFetch(set_flags_and_update_appearance);
}
@@ -2273,7 +2249,7 @@ bool idle_startup()
display_startup();
}
- return TRUE;
+ return true;
}
if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState())
@@ -2319,7 +2295,7 @@ bool idle_startup()
{
LL_DEBUGS("Avatar") << "avatar fully loaded" << LL_ENDL;
LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
+ return true;
}
}
else
@@ -2330,7 +2306,7 @@ bool idle_startup()
// We have our clothing, proceed.
LL_DEBUGS("Avatar") << "wearables loaded" << LL_ENDL;
LLStartUp::setStartupState( STATE_CLEANUP );
- return TRUE;
+ return true;
}
}
//fall through this frame to STATE_CLEANUP
@@ -2359,7 +2335,7 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
//gViewerWindow->revealIntroPanel();
gViewerWindow->setStartupComplete();
- gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ gViewerWindow->setProgressCancelButtonVisible(false);
display_startup();
// We're not away from keyboard, even though login might have taken
@@ -2427,10 +2403,10 @@ bool idle_startup()
LLPerfStats::StatsRecorder::setAutotuneInit();
- return TRUE;
+ return true;
}
- return TRUE;
+ return true;
}
//
@@ -2444,7 +2420,7 @@ void login_show()
// Hide the toolbars: may happen to come back here if login fails after login agent but before login in region
if (gToolBarView)
{
- gToolBarView->setVisible(FALSE);
+ gToolBarView->setVisible(false);
}
LLPanelLogin::show( gViewerWindow->getWindowRectScaled(), login_callback, NULL );
@@ -2466,7 +2442,7 @@ void login_callback(S32 option, void *userdata)
if (!gSavedSettings.getBOOL("RememberPassword"))
{
// turn off the setting and write out to disk
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
+ gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , true );
LLUIColorTable::instance().saveUserSettings();
}
@@ -2949,7 +2925,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL;
}
- gAgent.setOutfitChosen(TRUE);
+ gAgent.setOutfitChosen(true);
gAgentWearables.sendDummyAgentWearablesUpdate();
}
@@ -3044,13 +3020,18 @@ void reset_login()
if ( gViewerWindow )
{ // Hide menus and normal buttons
- gViewerWindow->setNormalControlsVisible( FALSE );
- gLoginMenuBarView->setVisible( TRUE );
- gLoginMenuBarView->setEnabled( TRUE );
+ gViewerWindow->setNormalControlsVisible( false );
+ gLoginMenuBarView->setVisible( true );
+ gLoginMenuBarView->setEnabled( true );
}
// Hide any other stuff
LLFloaterReg::hideVisibleInstances();
+
+ if (LLStartUp::getStartupState() > STATE_WORLD_INIT)
+ {
+ gViewerWindow->resetStatusBarContainer();
+ }
LLStartUp::setStartupState( STATE_BROWSER_INIT );
if (LLVoiceClient::instanceExists())
@@ -3431,8 +3412,8 @@ void trust_cert_done(const LLSD& notification, const LLSD& response)
}
case OPT_CANCEL_TRUST:
reset_login();
- gSavedSettings.setBOOL("AutoLogin", FALSE);
- LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ gSavedSettings.setBOOL("AutoLogin", false);
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
default:
LLPanelLogin::giveFocus();
break;
@@ -3650,7 +3631,7 @@ bool process_login_success_response()
gFirstSim.set(sim_ip_str, sim_port);
if (gFirstSim.isOk())
{
- gMessageSystem->enableCircuit(gFirstSim, TRUE);
+ gMessageSystem->enableCircuit(gFirstSim, true);
}
}
std::string region_x_str = response["region_x"];
@@ -3749,7 +3730,7 @@ bool process_login_success_response()
// outfit is chosen on COF contents, initial outfit
// requested and available, etc.
- //gAgent.setGenderChosen(TRUE);
+ //gAgent.setGenderChosen(true);
}
bool pacific_daylight_time = false;
@@ -3895,6 +3876,6 @@ void transition_back_to_login_panel(const std::string& emsg)
{
// Bounce back to the login screen.
reset_login(); // calls LLStartUp::setStartupState( STATE_LOGIN_SHOW );
- gSavedSettings.setBOOL("AutoLogin", FALSE);
+ gSavedSettings.setBOOL("AutoLogin", false);
}