diff options
-rw-r--r-- | doc/contributions.txt | 3 | ||||
-rw-r--r-- | indra/llcommon/llversionviewer.h | 2 | ||||
-rw-r--r-- | indra/llrender/llrendertarget.cpp | 15 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 3 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 35 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/linux_tools/handle_secondlifeprotocol.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/linux_tools/register_secondlifeprotocol.sh | 0 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 122 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 16 | ||||
-rw-r--r-- | indra/newview/llfloatercolorpicker.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llhudeffectlookat.cpp | 29 | ||||
-rw-r--r-- | indra/newview/llhudeffectlookat.h | 2 | ||||
-rw-r--r-- | indra/newview/llhudeffectpointat.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llhudeffectpointat.h | 2 | ||||
-rw-r--r-- | indra/newview/llprogressview.cpp | 75 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewerkeyboard.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 26 |
20 files changed, 259 insertions, 138 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 31c1e2cc6e..f6dfb063a9 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -45,6 +45,7 @@ Alissa Sabre VWR-6384 VWR-6385 VWR-5929 + VWR-6430 Angus Boyd VWR-592 Argent Stonecutter @@ -332,6 +333,8 @@ Strife Onizuka VWR-183 VWR-2265 VWR-4111 +Teardrops Fall + VWR-5366 tenebrous pau VWR-247 TBBle Kurosawa diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index c586acc7d9..a1fd0ff509 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -34,7 +34,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 20; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_PATCH = 2; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 593a5a18e5..cbadb029ac 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -80,15 +80,16 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 stop_glerror(); - if (depth) + if ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject) { - stop_glerror(); - allocateDepth(); - stop_glerror(); - } - if ((sUseFBO && use_fbo) && gGLManager.mHasFramebufferObject) - { + if (depth) + { + stop_glerror(); + allocateDepth(); + stop_glerror(); + } + glGenFramebuffersEXT(1, (GLuint *) &mFBO); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBO); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 0a40fb8a95..e6e999bac4 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1277,7 +1277,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO << " Depth Bits " << S32(pfd.cDepthBits) << llendl; - if (pfd.cColorBits < 32) + // make sure we have 32 bits per pixel + if (pfd.cColorBits < 32 || GetDeviceCaps(mhDC, BITSPIXEL) < 32) { close(); OSMessageBox( diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f6bedc3339..41566d68d0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -76,6 +76,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>AllowTapTapHoldRun</key> + <map> + <key>Comment</key> + <string>Tapping a direction key twice and holding it down makes avatar run</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>AnimateTextures</key> <map> <key>Comment</key> @@ -938,7 +949,7 @@ <key>Comment</key> <string>Disable Voice.</string> <key>Persist</key> - <integer>1</integer> + <integer>0</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> @@ -4768,6 +4779,17 @@ <key>Value</key> <real>0</real> </map> + <key>PerAccountSettingsFile</key> + <map> + <key>Comment</key> + <string>Persisted client settings file name (per user).</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string /> + </map> <key>PermissionsCautionEnabled</key> <map> <key>Comment</key> @@ -8832,17 +8854,6 @@ <key>Value</key> <map /> </map> - <key>UserSettingsFile</key> - <map> - <key>Comment</key> - <string>Persisted client settings file name (per user).</string> - <key>Persist</key> - <integer>0</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string /> - </map> <key>UseStartScreen</key> <map> <key>Comment</key> diff --git a/indra/newview/linux_tools/handle_secondlifeprotocol.sh b/indra/newview/linux_tools/handle_secondlifeprotocol.sh index 7ff86d1b93..7ff86d1b93 100644..100755 --- a/indra/newview/linux_tools/handle_secondlifeprotocol.sh +++ b/indra/newview/linux_tools/handle_secondlifeprotocol.sh diff --git a/indra/newview/linux_tools/register_secondlifeprotocol.sh b/indra/newview/linux_tools/register_secondlifeprotocol.sh index 4ab96f97d6..4ab96f97d6 100644..100755 --- a/indra/newview/linux_tools/register_secondlifeprotocol.sh +++ b/indra/newview/linux_tools/register_secondlifeprotocol.sh diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 69c71224a9..8c62969bec 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -235,10 +235,10 @@ LLString gDisabledMessage; // Set in LLAppViewer::initConfiguration used in idle BOOL gHideLinks = FALSE; // Set in LLAppViewer::initConfiguration, used externally BOOL gAllowIdleAFK = TRUE; +BOOL gAllowTapTapHoldRun = TRUE; BOOL gShowObjectUpdates = FALSE; BOOL gUseQuickTime = TRUE; -const char* DEFAULT_SETTINGS_FILE = "settings.xml"; BOOL gAcceptTOS = FALSE; BOOL gAcceptCriticalMessage = FALSE; @@ -404,6 +404,7 @@ static void settings_to_globals() gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); gAllowIdleAFK = gSavedSettings.getBOOL("AllowIdleAFK"); + gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); gMapScale = gSavedSettings.getF32("MapScale"); gMiniMapScale = gSavedSettings.getF32("MiniMapScale"); @@ -559,6 +560,10 @@ bool send_url_to_other_instance(const std::string& url) // The single viewer app. LLAppViewer* LLAppViewer::sInstance = NULL; +const std::string LLAppViewer::sGlobalSettingsName = "Global"; +const std::string LLAppViewer::sPerAccountSettingsName = "PerAccount"; +const std::string LLAppViewer::sCrashSettingsName = "CrashSettings"; + LLTextureCache* LLAppViewer::sTextureCache = NULL; LLWorkerThread* LLAppViewer::sImageDecodeThread = NULL; LLTextureFetch* LLAppViewer::sTextureFetch = NULL; @@ -1266,9 +1271,9 @@ bool LLAppViewer::cleanup() // save their rects on delete. gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); - // UserSettingsFile should be empty if no use has been logged on. + // PerAccountSettingsFile should be empty if no use has been logged on. // *FIX:Mani This should get really saved in a "logoff" mode. - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("UserSettingsFile"), TRUE); + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); llinfos << "Saved settings" << llendflush; std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); @@ -1443,13 +1448,31 @@ void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index) { LLString settings_name = (*itr).first; LLString settings_file = mSettingsFileList[settings_name].asString(); + LLString full_settings_path = gDirUtilp->getExpandedFilename(path_index, settings_file); + + if(settings_name == sGlobalSettingsName) + { + // The non-persistent setting, ClientSettingsFile, specifies a + // custom name to use for the global settings file. + std::string custom_path; + if(gSettings[sGlobalSettingsName]->controlExists("ClientSettingsFile")) + { + custom_path = + gSettings[sGlobalSettingsName]->getString("ClientSettingsFile"); + } + if(!custom_path.empty()) + { + full_settings_path = custom_path; + } + } + if(gSettings.find(settings_name) == gSettings.end()) { llwarns << "Cannot load " << settings_file << " - No matching settings group for name " << settings_name << llendl; continue; } - if(!gSettings[settings_name]->loadFromFile(gDirUtilp->getExpandedFilename(path_index, settings_file))) + if(!gSettings[settings_name]->loadFromFile(full_settings_path)) { llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; } @@ -1460,12 +1483,21 @@ void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index) } } +std::string LLAppViewer::getSettingsFileName(const std::string& file) +{ + if(mSettingsFileList.has(file)) + { + return mSettingsFileList[file].asString(); + } + return std::string(); +} + bool LLAppViewer::initConfiguration() { //Set up internal pointers - gSettings["Global"] = &gSavedSettings; - gSettings["PerAccount"] = &gSavedPerAccountSettings; - gSettings["CrashSettings"] = &gCrashSettings; + gSettings[sGlobalSettingsName] = &gSavedSettings; + gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings; + gSettings[sCrashSettingsName] = &gCrashSettings; //Load settings files list std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml"); @@ -1478,15 +1510,22 @@ bool LLAppViewer::initConfiguration() mSettingsFileList = settings_control.getLLSD("Files"); - //Order of loading - // - App Settings (Defaults) - // - user_settings (Client Overrides) - // - user directory (user specific overrides, happens in llstartup) + // The settings and command line parsing have a fragile + // order-of-operation: + // - load defaults from app_settings + // - set procedural settings values + // - read command line settings + // - selectively apply settings needed to load user settings. + // - load overrides from user_settings + // - apply command line settings (to override the overrides) + // - load per account settings (happens in llstartup + + // - load defaults loadSettingsFromDirectory(LL_PATH_APP_SETTINGS); - //Fix settings that require compiled information + // - set procedural settings gSavedSettings.setString("ClientSettingsFile", - gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DEFAULT_SETTINGS_FILE)); + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFileName("Global"))); gSavedSettings.setString("VersionChannelName", LL_CHANNEL); @@ -1544,9 +1583,6 @@ bool LLAppViewer::initConfiguration() // Do this *before* loading the settings file LLAlertDialog::parseAlerts("alerts.xml", &gSavedSettings, TRUE); - // Overwrite default user settings with user settings - loadSettingsFromDirectory(LL_PATH_USER_SETTINGS); - #if LL_DYNAMIC_FONT_DISCOVERY // Linux does *dynamic* font discovery which is preferable to // whatever got written-out into the config file last time. This @@ -1556,7 +1592,7 @@ bool LLAppViewer::initConfiguration() LLWindow::getFontListSans()); #endif - // Parse command line settings. + // - read command line settings. LLControlGroupCLP clp; std::string cmd_line_config = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cmd_line.xml"); @@ -1582,36 +1618,35 @@ bool LLAppViewer::initConfiguration() return false; } + + // - selectively apply settings // If we have specified crash on startup, might as well do it now. if(clp.hasOption("crashonstartup")) { LLAppViewer::instance()->forceErrorLLError(); } - + // If the user has specified a alternate settings file name. - // Load it now. + // Load it now before loading the user_settings/settings.xml if(clp.hasOption("settings")) { - std::string user_settings_filename = clp.getOption("settings")[0]; - std::string full_settings_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - user_settings_filename); - - llinfos << "Loading command line specified settings file: " << full_settings_path << llendl; - - if(!gSavedSettings.loadFromFile(full_settings_path)) - { - llwarns << "File not found: " << full_settings_path << llendl; - } - - gSavedSettings.setString("ClientSettingsFile", full_settings_path); + std::string user_settings_filename = + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + clp.getOption("settings")[0]); + gSavedSettings.setString("ClientSettingsFile", user_settings_filename); + llinfos << "Using command line specified settings filename: " + << user_settings_filename << llendl; } - // Apply the command line params to the settings system. - // Anyway the following call to notify depends upon the settings being init'd. + // - load overrides from user_settings + loadSettingsFromDirectory(LL_PATH_USER_SETTINGS); + + // - apply command line settings clp.notify(); - // Start up the debugging console before handling other options. + // Handle initialization from settings. + // Start up the debugging console before handling other options. if (gSavedSettings.getBOOL("ShowConsoleWindow")) { initConsole(); @@ -1647,7 +1682,7 @@ bool LLAppViewer::initConfiguration() // { // const std::string& name = *itr; // const std::string& value = *(++itr); - // LLControlVariable* c = gSettings["global"]->getControl(name); + // LLControlVariable* c = gSettings[sGlobalSettingsName]->getControl(name); // if(c) // { // c->setDefault(value); @@ -1675,7 +1710,7 @@ bool LLAppViewer::initConfiguration() { const std::string& name = *itr; const std::string& value = *(++itr); - LLControlVariable* c = gSettings["Global"]->getControl(name); + LLControlVariable* c = gSettings[sGlobalSettingsName]->getControl(name); if(c) { c->setValue(value, false); @@ -1866,7 +1901,6 @@ bool LLAppViewer::initConfiguration() // Check for another instance of the app running // - mSecondInstance = anotherInstanceRunning(); if (mSecondInstance) @@ -1966,15 +2000,14 @@ bool LLAppViewer::initConfiguration() if (mSecondInstance) { - gSavedSettings.setBOOL("CmdLineDisableVoice", TRUE); - /* Don't start another instance if using -multiple - //RN: if we received a URL, hand it off to the existing instance - if (LLURLSimString::parse()) + // This is the second instance of SL. Turn off voice support, + // but make sure the setting is *not* persisted. + LLControlVariable* disable_voice = gSavedSettings.getControl("CmdLineDisableVoice"); + if(disable_voice) { - LLURLSimString::send_to_other_instance(); - return 1; + const BOOL DO_NOT_PERSIST = FALSE; + disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST); } - */ } initMarkerFile(); @@ -2084,6 +2117,7 @@ void LLAppViewer::cleanupSavedSettings() gSavedSettings.setBOOL("DebugWindowProc", gDebugWindowProc); gSavedSettings.setBOOL("AllowIdleAFK", gAllowIdleAFK); + gSavedSettings.setBOOL("AllowTapTapHoldRun", gAllowTapTapHoldRun); gSavedSettings.setBOOL("ShowObjectUpdates", gShowObjectUpdates); if (!gNoRender) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 2d050c3d94..56dd0efbdd 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -124,7 +124,20 @@ public: virtual void forceErrorInifiniteLoop(); virtual void forceErrorSoftwareException(); + // *NOTE: There are currently 3 settings files: + // "Global", "PerAccount" and "CrashSettings" + // The list is found in app_settings/settings_files.xml + // but since they are used explicitly in code, + // the follow consts should also do the trick. + static const std::string sGlobalSettingsName; + static const std::string sPerAccountSettingsName; + static const std::string sCrashSettingsName; + void loadSettingsFromDirectory(ELLPath path_index); + + std::string getSettingsFileName(const std::string& file); + + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. @@ -210,10 +223,9 @@ extern BOOL gHideLinks; // used by llpanellogin, lllfloaterbuycurrency, llstartu extern LLSD gDebugInfo; extern BOOL gAllowIdleAFK; +extern BOOL gAllowTapTapHoldRun; extern BOOL gShowObjectUpdates; -extern const char* DEFAULT_SETTINGS_FILE; // llstartup - extern BOOL gAcceptTOS; extern BOOL gAcceptCriticalMessage; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index c805eea6ae..751de2be20 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -902,9 +902,7 @@ BOOL LLFloaterColorPicker:: handleMouseDown ( S32 x, S32 y, MASK mask ) { - BOOL ret = LLFloater::handleMouseDown ( x, y, mask ); - - // make it the frontmost + // make it the frontmost gFloaterView->bringToFront(this); // rect containing RGB area @@ -998,7 +996,8 @@ handleMouseDown ( S32 x, S32 y, MASK mask ) } // dispatch to base class for the rest of things - return ret; + + return LLFloater::handleMouseDown ( x, y, mask ); } ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 613f310b08..046eac73fe 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -400,7 +400,11 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec return FALSE; } - llassert(target_type < LOOKAT_NUM_TARGETS); + if (target_type >= LOOKAT_NUM_TARGETS) + { + llwarns << "Bad target_type " << (int)target_type << " - ignoring." << llendl; + return FALSE; + } // must be same or higher priority than existing effect if ((*mAttentions)[target_type].mPriority < (*mAttentions)[mTargetType].mPriority) @@ -557,12 +561,13 @@ void LLHUDEffectLookAt::update() if (mTargetType != LOOKAT_TARGET_NONE) { - calcTargetPosition(); - - LLMotion* head_motion = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->findMotion(ANIM_AGENT_HEAD_ROT); - if (!head_motion || head_motion->isStopped()) + if (calcTargetPosition()) { - ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->startMotion(ANIM_AGENT_HEAD_ROT); + LLMotion* head_motion = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->findMotion(ANIM_AGENT_HEAD_ROT); + if (!head_motion || head_motion->isStopped()) + { + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->startMotion(ANIM_AGENT_HEAD_ROT); + } } } @@ -579,12 +584,14 @@ void LLHUDEffectLookAt::update() * * Has the side-effect of also calling setAnimationData("LookAtPoint") with the new * mTargetPos on the source object which is assumed to be an avatar. + * + * Returns whether we successfully calculated a finite target position. */ -void LLHUDEffectLookAt::calcTargetPosition() +bool LLHUDEffectLookAt::calcTargetPosition() { if (gNoRender) { - return; + return false; } LLViewerObject *target_obj = (LLViewerObject *)mTargetObject; @@ -659,5 +666,11 @@ void LLHUDEffectLookAt::calcTargetPosition() } mTargetPos -= source_avatar->mHeadp->getWorldPosition(); + + if (!mTargetPos.isFinite()) + return false; + source_avatar->setAnimationData("LookAtPoint", (void *)&mTargetPos); + + return true; } diff --git a/indra/newview/llhudeffectlookat.h b/indra/newview/llhudeffectlookat.h index ef3691d8d7..c1a123f55c 100644 --- a/indra/newview/llhudeffectlookat.h +++ b/indra/newview/llhudeffectlookat.h @@ -68,7 +68,7 @@ public: ELookAtType getLookAtType() { return mTargetType; } const LLVector3& getTargetPos() { return mTargetPos; } const LLVector3d& getTargetOffset() { return mTargetOffsetGlobal; } - void calcTargetPosition(); + bool calcTargetPosition(); protected: LLHUDEffectLookAt(const U8 type); diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index 2679ed5fbb..4c352bab72 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -232,7 +232,11 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob return FALSE; } - llassert(target_type < POINTAT_NUM_TARGETS); + if (target_type >= POINTAT_NUM_TARGETS) + { + llwarns << "Bad target_type " << (int)target_type << " - ignoring." << llendl; + return FALSE; + } // must be same or higher priority than existing effect if (POINTAT_PRIORITIES[target_type] < POINTAT_PRIORITIES[mTargetType]) @@ -379,17 +383,19 @@ void LLHUDEffectPointAt::update() } else { - calcTargetPosition(); - - ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->startMotion(ANIM_AGENT_EDITING); + if (calcTargetPosition()) + { + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->startMotion(ANIM_AGENT_EDITING); + } } } } //----------------------------------------------------------------------------- // calcTargetPosition() +// returns whether we successfully calculated a finite target position. //----------------------------------------------------------------------------- -void LLHUDEffectPointAt::calcTargetPosition() +bool LLHUDEffectPointAt::calcTargetPosition() { LLViewerObject *targetObject = (LLViewerObject *)mTargetObject; LLVector3 local_offset; @@ -435,10 +441,15 @@ void LLHUDEffectPointAt::calcTargetPosition() mTargetPos -= mSourceObject->getRenderPosition(); + if (!mTargetPos.isFinite()) + return false; + if (mSourceObject->isAvatar()) { ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->setAnimationData("PointAtPoint", (void *)&mTargetPos); } + + return true; } const LLVector3d LLHUDEffectPointAt::getPointAtPosGlobal() diff --git a/indra/newview/llhudeffectpointat.h b/indra/newview/llhudeffectpointat.h index 3d1ded6c7b..ba8835073c 100644 --- a/indra/newview/llhudeffectpointat.h +++ b/indra/newview/llhudeffectpointat.h @@ -71,7 +71,7 @@ protected: // lookat behavior has either target position or target object with offset void setTargetObjectAndOffset(LLViewerObject *objp, LLVector3d offset); void setTargetPosGlobal(const LLVector3d &target_pos_global); - void calcTargetPosition(); + bool calcTargetPosition(); void update(); public: static BOOL sDebugPointAt; diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 15795d57cd..d27b587a09 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -255,10 +255,11 @@ void LLProgressView::draw() const LLFontGL* font = LLFontGL::sSansSerif; LLUIImagePtr shadow_imagep = LLUI::getUIImage("rounded_square_soft.tga"); + LLUIImagePtr bar_fg_imagep = LLUI::getUIImage("progressbar_fill.tga"); + LLUIImagePtr bar_bg_imagep = LLUI::getUIImage("progressbar_track.tga"); LLUIImagePtr bar_imagep = LLUI::getUIImage("rounded_square.tga"); - - //LLColor4 background_color = gColors.getColor("DefaultShadowLight"); - LLColor4 background_color = LLColor4(0.3254f, 0.4f, 0.5058f, 1.0f); + + LLColor4 background_color = gColors.getColor("LoginProgressBarBgColor"); F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32())); // background_color.mV[3] = background_color.mV[3]*alpha; @@ -278,22 +279,22 @@ void LLProgressView::draw() S32 background_box_width = background_box_right - background_box_left + 1; S32 background_box_height = background_box_top - background_box_bottom + 1; - shadow_imagep->draw( background_box_left + 2, - background_box_bottom - 2, - background_box_width, - background_box_height, - gColors.getColor( "ColorDropShadow" ) ); - bar_imagep->draw( background_box_left, - background_box_bottom, - background_box_width, - background_box_height, - LLColor4( 0.0f, 0.0f, 0.0f, 0.4f ) ); +// shadow_imagep->draw( background_box_left + 2, +// background_box_bottom - 2, +// background_box_width, +// background_box_height, +// gColors.getColor( "LoginProgressBoxShadowColor" ) ); +// bar_outline_imagep->draw( background_box_left, +// background_box_bottom, +// background_box_width, +// background_box_height, +// gColors.getColor("LoginProgressBoxBorderColor") ); bar_imagep->draw( background_box_left + 1, background_box_bottom + 1, background_box_width - 2, background_box_height - 2, - LLColor4( 0.4f, 0.4f, 0.4f, 0.3f ) ); + gColors.getColor("LoginProgressBoxCenterColor") ); // we'll need this later for catching a click if it looks like it contains a link if ( mMessage.find( "http://" ) != std::string::npos ) @@ -304,39 +305,41 @@ void LLProgressView::draw() // draw loading bar font->renderUTF8(top_line, 0, line_x, line_one_y, - LLColor4::white, + //LLColor4::white, + gColors.getColor("LoginProgressBoxTextColor"), LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); font->renderUTF8(mText, 0, line_x, line_two_y, - LLColor4::white, + //LLColor4::white, + gColors.getColor("LoginProgressBoxTextColor"), LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); - - shadow_imagep->draw( - bar_left + 2, - bar_bottom - 2, - bar_width, - bar_height, - gColors.getColor("ColorDropShadow")); - - bar_imagep->draw( - bar_left, - bar_bottom, - bar_width, - bar_height, - LLColor4(0.7f, 0.7f, 0.8f, 1.0f)); - - bar_imagep->draw( + +// shadow_imagep->draw( +// bar_left + 2, +// bar_bottom - 2, +// bar_width, +// bar_height, +// gColors.getColor("LoginProgressBoxShadowColor")); + +// bar_imagep->draw( +// bar_left, +// bar_bottom, +// bar_width, +// bar_height, +// LLColor4(0.7f, 0.7f, 0.8f, 1.0f)); + + bar_bg_imagep->draw( bar_left + 2, bar_bottom + 2, bar_width - 4, bar_height - 4, background_color); - LLColor4 bar_color = LLColor4(0.5764f, 0.6627f, 0.8352f, 1.0f); + LLColor4 bar_color = gColors.getColor("LoginProgressBarFgColor"); bar_color.mV[3] = alpha; - bar_imagep->draw( + bar_fg_imagep->draw( bar_left + 2, bar_bottom + 2, llround((bar_width - 4) * (mPercentDone / 100.f)), @@ -348,6 +351,7 @@ void LLProgressView::draw() // draw the message if there is one if(!mMessage.empty()) { + LLColor4 text_message_color = gColors.getColor("LoginProgressBoxTextColor"); LLWString wmessage = utf8str_to_wstring(mMessage); const F32 MAX_PIXELS = 640.0f; S32 chars_left = wmessage.length(); @@ -362,7 +366,8 @@ void LLProgressView::draw() LLWString wbuffer = wmessage.substr(msgidx, chars_this_time); font->render(wbuffer, 0, (F32)line_x, (F32)line_three_y, - LLColor4::white, + //LLColor4::white, + gColors.getColor("LoginProgressBoxTextColor"), LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); msgidx += chars_this_time; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6cd4d90e5f..139ab8f1aa 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -773,9 +773,12 @@ BOOL idle_startup() gDirUtilp->setLindenUserDir(firstname.c_str(), lastname.c_str()); LLFile::mkdir(gDirUtilp->getLindenUserDir().c_str()); - // Set UserSettingsFile to the default value. - gSavedSettings.setString("UserSettingsFile", - gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, DEFAULT_SETTINGS_FILE)); + // Set PerAccountSettingsFile to the default value. + gSavedSettings.setString("PerAccountSettingsFile", + gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, + LLAppViewer::instance()->getSettingsFileName("PerAccount") + ) + ); // Overwrite default user settings with user settings LLAppViewer::instance()->loadSettingsFromDirectory(LL_PATH_PER_SL_ACCOUNT); diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index b885e4e6b9..bea4b910b6 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -31,6 +31,7 @@ #include "llviewerprecompiledheaders.h" +#include "llappviewer.h" #include "llviewerkeyboard.h" #include "llmath.h" #include "llagent.h" @@ -99,7 +100,8 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m } gAgent.mDoubleTapRunMode = mode; } - else if (KEYSTATE_DOWN == s && + else if (gAllowTapTapHoldRun && + KEYSTATE_DOWN == s && gAgent.mDoubleTapRunMode == mode && gAgent.mDoubleTapRunTimer.getElapsedTimeF32() < NUDGE_TIME) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3a09af3fce..cfcd446b55 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1490,6 +1490,7 @@ void init_debug_avatar_menu(LLMenuGL* menu) menu->appendMenu(sub_menu); + menu->append(new LLMenuItemToggleGL("Tap-Tap-Hold To Run", &gAllowTapTapHoldRun)); menu->append(new LLMenuItemCallGL("Force Params to Default", &LLAgent::clearVisualParams, NULL)); menu->append(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL)); menu->append(new LLMenuItemToggleGL("Animation Info", &LLVOAvatar::sShowAnimationDebug)); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c6c751147c..a753032180 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4419,19 +4419,11 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei F32 scale_factor = 1.0f ; if(!keep_window_aspect) //image cropping - { - //if(snapshot_width > image_width && snapshot_height > image_height) //crop - //{ - // snapshot_width = image_width ; - // snapshot_height = image_height ; - //} - //else //crop and enlarge - { - F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; - snapshot_width = (S32)(ratio * image_width) ; - snapshot_height = (S32)(ratio * image_height) ; - scale_factor = llmax(1.0f, 1.0f / ratio) ; - } + { + F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; + snapshot_width = (S32)(ratio * image_width) ; + snapshot_height = (S32)(ratio * image_height) ; + scale_factor = llmax(1.0f, 1.0f / ratio) ; } LLRenderTarget target; @@ -4457,6 +4449,13 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei mWindowRect.set(0, 0, snapshot_width, snapshot_height); target.bindTarget(); } + else //tiling + { + F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; + snapshot_width = (S32)(ratio * image_width) ; + snapshot_height = (S32)(ratio * image_height) ; + scale_factor = llmax(1.0f, 1.0f / ratio) ; + } } S32 buffer_x_offset = llfloor(((window_width - snapshot_width) * scale_factor) / 2.f); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ce4a660682..e7dbf0bfb8 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2063,6 +2063,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { if (group->isState(LLSpatialGroup::MESH_DIRTY)) { + S32 num_mapped_veretx_buffer = LLVertexBuffer::sMappedCount ; + group->mBuilt = 1.f; LLFastTimer ftm(LLFastTimer::FTM_REBUILD_VBO); @@ -2071,6 +2073,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; + + if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) ) + { + continue; + } + if (drawablep->isState(LLDrawable::REBUILD_ALL)) { LLVOVolume* vobj = drawablep->getVOVolume(); @@ -2112,6 +2120,24 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) group->mVertexBuffer->setBuffer(0); } + //if not all buffers are unmapped + if(num_mapped_veretx_buffer != LLVertexBuffer::sMappedCount) + { + llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ; + for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter) + { + LLDrawable* drawablep = *drawable_iter; + for (S32 i = 0; i < drawablep->getNumFaces(); ++i) + { + LLFace* face = drawablep->getFace(i); + if (face && face->mVertexBuffer.notNull() && face->mVertexBuffer->isLocked()) + { + face->mVertexBuffer->setBuffer(0) ; + } + } + } + } + group->clearState(LLSpatialGroup::MESH_DIRTY); } |