diff options
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 456100d7ea..09d5e64571 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -284,8 +284,8 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance); extern void init_apple_menu(const char* product); #endif // LL_DARWIN -extern BOOL gRandomizeFramerate; -extern BOOL gPeriodicSlowFrame; +extern bool gRandomizeFramerate; +extern bool gPeriodicSlowFrame; extern bool gDebugGL; #if LL_DARWIN @@ -298,8 +298,8 @@ extern bool gHiDPISupport; F32 gSimLastTime; // Used in LLAppViewer::init and send_viewer_stats() F32 gSimFrames; -BOOL gShowObjectUpdates = FALSE; -BOOL gUseQuickTime = TRUE; +bool gShowObjectUpdates = false; +bool gUseQuickTime = true; eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL; S32 gLastExecDuration = -1; // (<0 indicates unknown) @@ -339,12 +339,12 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; S32 gPendingMetricsUploads = 0; -BOOL gDisconnected = FALSE; +bool gDisconnected = false; // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; -BOOL gRestoreGL = FALSE; -bool gUseWireframe = FALSE; +bool gRestoreGL = false; +bool gUseWireframe = false; LLMemoryInfo gSysMemory; U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp @@ -356,16 +356,16 @@ LLVector3 gRelativeWindVec(0.0, 0.0, 0.0); U32 gPacketsIn = 0; -BOOL gPrintMessagesThisFrame = FALSE; +bool gPrintMessagesThisFrame = false; -BOOL gRandomizeFramerate = FALSE; -BOOL gPeriodicSlowFrame = FALSE; +bool gRandomizeFramerate = false; +bool gPeriodicSlowFrame = false; -BOOL gCrashOnStartup = FALSE; -BOOL gLLErrorActivated = FALSE; -BOOL gLogoutInProgress = FALSE; +bool gCrashOnStartup = false; +bool gLLErrorActivated = false; +bool gLogoutInProgress = false; -BOOL gSimulateMemLeak = FALSE; +bool gSimulateMemLeak = false; // We don't want anyone, especially threads working on the graphics pipeline, // to have to block due to this WorkQueue being full. @@ -380,7 +380,7 @@ const std::string START_MARKER_FILE_NAME("SecondLife.start_marker"); const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker"); const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker"); -static BOOL gDoDisconnect = FALSE; +static bool gDoDisconnect = false; static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) @@ -493,7 +493,7 @@ bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) LLIconCtrl* icon; if( match->getMenuName() == "menu_url_group.xml" // See LLUrlEntryGroup constructor - || gAgent.isInGroup(match_id, TRUE)) //This check seems unfiting, urls are either /agent or /group + || gAgent.isInGroup(match_id, true)) //This check seems unfiting, urls are either /agent or /group { LLGroupIconCtrl::Params icon_params; icon_params.group_id = match_id; @@ -575,7 +575,7 @@ static void settings_to_globals() static void settings_modify() { LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); - LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated + LLPipeline::sRenderDeferred = true; // false is deprecated LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred; LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] @@ -658,8 +658,8 @@ LLAppViewer::LLAppViewer() mLastAgentForceUpdate(0), mMainloopTimeout(NULL), mAgentRegionLastAlive(false), - mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)), - mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE)), + mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", false)), + mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", false)), mFastTimerLogThread(NULL), mSettingsLocationList(NULL), mIsFirstRun(false) @@ -1335,7 +1335,7 @@ bool LLAppViewer::frame() } catch (std::bad_alloc&) { - LLMemory::logMemoryInfo(TRUE); + LLMemory::logMemoryInfo(true); LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking"); if (mem_leak_instance) { @@ -1747,7 +1747,7 @@ bool LLAppViewer::cleanup() //flag all elements as needing to be destroyed immediately // to ensure shutdown order - LLMortician::setZealous(TRUE); + LLMortician::setZealous(true); // Give any remaining SLPlugin instances a chance to exit cleanly. LLPluginProcessParent::shutdown(); @@ -1953,7 +1953,7 @@ bool LLAppViewer::cleanup() // Must do this after all panels have been deleted because panels that have persistent rects // save their rects on delete. - gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true); LLUIColorTable::instance().saveUserSettings(); @@ -1972,7 +1972,7 @@ bool LLAppViewer::cleanup() } else { - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), true); LL_INFOS() << "Saved settings" << LL_ENDL; if (LLViewerParcelAskPlay::instanceExists()) @@ -1982,7 +1982,7 @@ bool LLAppViewer::cleanup() } std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings")); - gWarningSettings.saveToFile(warnings_settings_filename, TRUE); + gWarningSettings.saveToFile(warnings_settings_filename, true); // Save URL history file LLURLHistory::saveFile("url_history.xml"); @@ -2507,7 +2507,7 @@ bool LLAppViewer::initConfiguration() //Load settings files list std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml"); LLXMLNodePtr root; - BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL); + bool success = LLXMLNode::parseFile(settings_file_list, root, NULL); if (!success) { LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL; @@ -2802,10 +2802,10 @@ bool LLAppViewer::initConfiguration() if (gNonInteractive) { - tempSetControl("AllowMultipleViewers", "TRUE"); - tempSetControl("SLURLPassToOtherInstance", "FALSE"); - tempSetControl("RenderWater", "FALSE"); - tempSetControl("FlyingAtExit", "FALSE"); + tempSetControl("AllowMultipleViewers", "true"); + tempSetControl("SLURLPassToOtherInstance", "false"); + tempSetControl("RenderWater", "false"); + tempSetControl("FlyingAtExit", "false"); tempSetControl("WindowWidth", "1024"); tempSetControl("WindowHeight", "200"); LLError::setEnabledLogTypesMask(0); @@ -2950,8 +2950,8 @@ bool LLAppViewer::initConfiguration() LLControlVariable* disable_voice = gSavedSettings.getControl("CmdLineDisableVoice"); if(disable_voice) { - const BOOL DO_NOT_PERSIST = FALSE; - disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST); + const bool DO_NOT_PERSIST = false; + disable_voice->setValue(LLSD(true), DO_NOT_PERSIST); } } @@ -3064,7 +3064,7 @@ bool LLAppViewer::initWindow() gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient"); // always start windowed - BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); + bool ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); LLViewerWindow::Params window_params; window_params @@ -3534,7 +3534,7 @@ void LLAppViewer::cleanupSavedSettings() // as we don't track it in callbacks if(NULL != gViewerWindow) { - BOOL maximized = gViewerWindow->getWindow()->getMaximized(); + bool maximized = gViewerWindow->getWindow()->getMaximized(); if (!maximized) { LLCoordScreen window_pos; @@ -3811,7 +3811,7 @@ void LLAppViewer::processMarkerFiles() initLoggingAndGetLastDuration(); // Create the marker file for this execution & lock it; it will be deleted on a clean exit apr_status_t s; - s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, TRUE); + s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, true); if (s == APR_SUCCESS && mMarkerFile.getFileHandle()) { @@ -3999,7 +3999,7 @@ void LLAppViewer::requestQuit() gAgentAvatarp->updateAvatarRezMetrics(true); // force a last packet to be sent. } - 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(); @@ -4058,7 +4058,7 @@ static bool finish_early_exit(const LLSD& notification, const LLSD& response) void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) { LL_WARNS() << "app_early_exit: " << name << LL_ENDL; - gDoDisconnect = TRUE; + gDoDisconnect = true; LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit); } @@ -4066,7 +4066,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) void LLAppViewer::earlyExitNoNotify() { LL_WARNS() << "app_early_exit with no notification: " << LL_ENDL; - gDoDisconnect = TRUE; + gDoDisconnect = true; finish_early_exit( LLSD(), LLSD() ); } @@ -4180,7 +4180,7 @@ U32 LLAppViewer::getObjectCacheVersion() bool LLAppViewer::initCache() { mPurgeCache = false; - BOOL read_only = mSecondInstance ? TRUE : FALSE; + bool read_only = mSecondInstance ? true : false; LLAppViewer::getTextureCache()->setReadOnly(read_only) ; LLVOCache::initParamSingleton(read_only); @@ -4387,7 +4387,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg) } LLSD args; - gDoDisconnect = TRUE; + gDoDisconnect = true; if (LLStartUp::getStartupState() < STATE_STARTED) { @@ -4410,7 +4410,7 @@ void LLAppViewer::badNetworkHandler() // Flush all of our caches on exit in the case of disconnect due to // invalid packets. - mPurgeCacheOnExit = TRUE; + mPurgeCacheOnExit = true; std::ostringstream message; message << @@ -4438,7 +4438,7 @@ void LLAppViewer::saveFinalSnapshot() gSavedSettings.setVector3d("FocusPosOnLogout", gAgentCamera.calcFocusPositionTargetGlobal()); gSavedSettings.setVector3d("CameraPosOnLogout", gAgentCamera.calcCameraPositionTargetGlobal()); gViewerWindow->setCursor(UI_CURSOR_WAIT); - gAgentCamera.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch + gAgentCamera.changeCameraToThirdPerson( false ); // don't animate, need immediate switch gSavedSettings.setBOOL("ShowParcelOwners", false); idle(); @@ -4449,12 +4449,12 @@ void LLAppViewer::saveFinalSnapshot() gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), - FALSE, + false, gSavedSettings.getBOOL("RenderHUDInSnapshot"), - TRUE, + true, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); - mSavedFinalSnapshot = TRUE; + mSavedFinalSnapshot = true; if (gAgent.isInHomeRegion()) { @@ -4683,7 +4683,7 @@ void LLAppViewer::idle() // When appropriate, update agent location to the simulator. F32 agent_update_time = agent_update_timer.getElapsedTimeF32(); F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time; - BOOL force_update = gAgent.controlFlagsDirty() + bool force_update = gAgent.controlFlagsDirty() || (mLastAgentControlFlags != gAgent.getControlFlags()) || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND)); if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) @@ -5047,7 +5047,7 @@ void LLAppViewer::idleShutdown() static S32 total_uploads = 0; // Sometimes total upload count can change during logout. total_uploads = llmax(total_uploads, pending_uploads); - gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setShowProgress(true); S32 finished_uploads = total_uploads - pending_uploads; F32 percent = 100.f * finished_uploads / total_uploads; gViewerWindow->setProgressPercent(percent); @@ -5068,7 +5068,7 @@ void LLAppViewer::idleShutdown() sendLogoutRequest(); // Wait for a LogoutReply message - gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setShowProgress(true); gViewerWindow->setProgressPercent(100.f); gViewerWindow->setProgressString(LLTrans::getString("LoggingOut")); return; @@ -5088,7 +5088,7 @@ void LLAppViewer::sendLogoutRequest() if(!mLogoutRequestSent && gMessageSystem) { //Set internal status variables and marker files before actually starting the logout process - gLogoutInProgress = TRUE; + gLogoutInProgress = true; if (!mSecondInstance) { mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); @@ -5118,7 +5118,7 @@ void LLAppViewer::sendLogoutRequest() gLogoutTimer.reset(); gLogoutMaxTime = LOGOUT_REQUEST_TIME; - mLogoutRequestSent = TRUE; + mLogoutRequestSent = true; if(LLVoiceClient::instanceExists()) { @@ -5290,7 +5290,7 @@ void LLAppViewer::idleNetwork() if (gPrintMessagesThisFrame) { LL_INFOS() << "Decoded " << total_decoded << " msgs this frame!" << LL_ENDL; - gPrintMessagesThisFrame = FALSE; + gPrintMessagesThisFrame = false; } } add(LLStatViewer::NUM_NEW_OBJECTS, gObjectList.mNumNewObjects); @@ -5389,7 +5389,7 @@ void LLAppViewer::disconnectViewer() LLDestroyClassList::instance().fireCallbacks(); cleanup_xfer_manager(); - gDisconnected = TRUE; + gDisconnected = true; // Pass the connection state to LLUrlEntryParcel not to attempt // parcel info requests while disconnected. |