diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-09-15 20:43:02 +0300 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-09-15 20:43:02 +0300 | 
| commit | b5861e58cb802118796d6a6ba7f45c8e8f67690b (patch) | |
| tree | e0ab150d6f60177b1b5ce971ed608d27e0af09c0 /indra/newview/llappviewer.cpp | |
| parent | eaf86980330251f1f5f8af5c4e9a7281d21a625c (diff) | |
| parent | c2a27c474dc11dff4f93b0bd319cfec7de27bb22 (diff) | |
Merge branch 'master' into DRTVWR-565-maint-P
Diffstat (limited to 'indra/newview/llappviewer.cpp')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 44 | 
1 files changed, 40 insertions, 4 deletions
| diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 69413577b3..5c8cdceca6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1450,6 +1450,8 @@ bool LLAppViewer::doFrame()  			LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df suspend" )  		// give listeners a chance to run  		llcoro::suspend(); +		// if one of our coroutines threw an uncaught exception, rethrow it now +		LLCoros::instance().rethrow();  		}  		if (!LLApp::isExiting()) @@ -3291,9 +3293,18 @@ LLSD LLAppViewer::getViewerInfo() const  	info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : "Undefined";  	if(LLVoiceClient::getInstance()->voiceEnabled())  	{ -		LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); +        LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); +        const std::string build_version = version.mBuildVersion;  		std::ostringstream version_string; -		version_string << version.serverType << " " << version.serverVersion << std::endl; +        if (std::equal(build_version.begin(), build_version.begin() + version.serverVersion.size(), +                       version.serverVersion.begin())) +        {  // Normal case: Show type and build version. +            version_string << version.serverType << " " << build_version << std::endl; +        } +        else +        {  // Mismatch: Show both versions. +            version_string << version.serverVersion << "/" << build_version << std::endl; +        }  		info["VOICE_VERSION"] = version_string.str();  	}  	else @@ -4257,6 +4268,15 @@ U32 LLAppViewer::getTextureCacheVersion()  }  //static +U32 LLAppViewer::getDiskCacheVersion() +{ +    // Viewer disk cache version intorduced in Simple Cache Viewer, change if the cache format changes. +    const U32 DISK_CACHE_VERSION = 1; + +    return DISK_CACHE_VERSION ; +} + +//static  U32 LLAppViewer::getObjectCacheVersion()  {  	// Viewer object cache version, change if object update @@ -4285,12 +4305,16 @@ bool LLAppViewer::initCache()  	const bool enable_cache_debug_info = gSavedSettings.getBOOL("EnableDiskCacheDebugInfo");  	bool texture_cache_mismatch = false; +    bool remove_vfs_files = false;  	if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion())  	{  		texture_cache_mismatch = true;  		if(!read_only)  		{  			gSavedSettings.setS32("LocalCacheVersion", LLAppViewer::getTextureCacheVersion()); + +            //texture cache version was bumped up in Simple Cache Viewer, and at this point old vfs files are not needed +            remove_vfs_files = true;     		}  	} @@ -4336,7 +4360,19 @@ bool LLAppViewer::initCache()  	if (!read_only)  	{ -		if (mPurgeCache) +        if (gSavedSettings.getS32("DiskCacheVersion") != LLAppViewer::getDiskCacheVersion()) +        { +            LLDiskCache::getInstance()->clearCache(); +            remove_vfs_files = true; +            gSavedSettings.setS32("DiskCacheVersion", LLAppViewer::getDiskCacheVersion()); +        } + +        if (remove_vfs_files) +        { +            LLDiskCache::getInstance()->removeOldVFSFiles(); +        } +         +        if (mPurgeCache)  		{  		LLSplashScreen::update(LLTrans::getString("StartupClearingCache"));  		purgeCache(); @@ -5418,7 +5454,7 @@ void LLAppViewer::disconnectViewer()  		gFloaterView->restoreAll();  	} -	if (LLSelectMgr::getInstance()) +	if (LLSelectMgr::instanceExists())  	{  		LLSelectMgr::getInstance()->deselectAll();  	} | 
