Merge branch 'DRTVWR-544-maint' of https://bitbucket.org/lindenlab/viewer
# Conflicts: # indra/llfilesystem/lldiskcache.h # indra/newview/app_settings/settings.xmlmaster
commit
1edfb172f5
|
|
@ -481,6 +481,38 @@ void LLDiskCache::clearCache()
|
|||
LL_INFOS() << "Cleared cache " << mCacheDir << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLDiskCache::removeOldVFSFiles()
|
||||
{
|
||||
//VFS files won't be created, so consider removing this code later
|
||||
static const char CACHE_FORMAT[] = "inv.llsd";
|
||||
static const char DB_FORMAT[] = "db2.x";
|
||||
|
||||
boost::system::error_code ec;
|
||||
#if LL_WINDOWS
|
||||
std::wstring cache_path(utf8str_to_utf16str(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "")));
|
||||
#else
|
||||
std::string cache_path(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""));
|
||||
#endif
|
||||
if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed())
|
||||
{
|
||||
for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path, ec), {}))
|
||||
{
|
||||
if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed())
|
||||
{
|
||||
if ((entry.path().string().find(CACHE_FORMAT) != std::string::npos) ||
|
||||
(entry.path().string().find(DB_FORMAT) != std::string::npos))
|
||||
{
|
||||
boost::filesystem::remove(entry, ec);
|
||||
if (ec.failed())
|
||||
{
|
||||
LL_WARNS() << "Failed to delete cache file " << entry << ": " << ec.message() << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uintmax_t LLDiskCache::dirFileSize(const std::string dir)
|
||||
{
|
||||
uintmax_t total_file_size = 0;
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ class LLDiskCache :
|
|||
*/
|
||||
const std::string getCacheInfo();
|
||||
|
||||
void removeOldVFSFiles();
|
||||
|
||||
// <FS:Ansariel> Better asset cache size control
|
||||
void setMaxSizeBytes(uintmax_t size) { mMaxSizeBytes = size; }
|
||||
|
||||
|
|
|
|||
|
|
@ -20055,6 +20055,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AllowSelectAvatar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allows user to select and move avatars, move is viewer sided, does not propagate to server, also supresses avatar position updates while avatars are selected</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>WebProfileFloaterRect</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -5062,12 +5062,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5140,8 +5144,14 @@ bool LLAppViewer::initCache()
|
|||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,6 +113,11 @@ BOOL LLFloater360Capture::postBuild()
|
|||
// by default each time vs restoring the last value
|
||||
mQualityRadioGroup->setSelectedIndex(0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLFloater360Capture::onOpen(const LLSD& key)
|
||||
{
|
||||
// Construct a URL pointing to the first page to load. Although
|
||||
// we do not use this page for anything (after some significant
|
||||
// design changes), we retain the code to load the start page
|
||||
|
|
@ -153,8 +158,6 @@ BOOL LLFloater360Capture::postBuild()
|
|||
// We do an initial capture when the floater is opened, albeit at a 'preview'
|
||||
// quality level (really low resolution, but really fast)
|
||||
onCapture360ImagesBtn();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// called when the user choose a quality level using
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class LLFloater360Capture:
|
|||
|
||||
~LLFloater360Capture();
|
||||
BOOL postBuild() override;
|
||||
void onOpen(const LLSD& key) override;
|
||||
void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override;
|
||||
|
||||
void changeInterestListMode(bool send_everything);
|
||||
|
|
|
|||
Loading…
Reference in New Issue