diff options
| author | Logan Dethrow <log@lindenlab.com> | 2011-05-20 16:00:36 -0400 |
|---|---|---|
| committer | Logan Dethrow <log@lindenlab.com> | 2011-05-20 16:00:36 -0400 |
| commit | 4b97f03b04e7df25e5b3622122f6d124d4a5f617 (patch) | |
| tree | 574f9f5cf37b90c6ab94e0c1147f14b6d2dfb774 /indra/newview/llappviewer.cpp | |
| parent | 39ad3f1d880a26dcf8189cad2501002c189a7ac2 (diff) | |
Revamped viewer cache preference controls.
Implemented improved cache control user interface, changes approved by wolf.
* Moved viewer cache controls from the setup preference panel to advanced
* Changed cache size control slider into a spinner
* Readded a clear cache button along with a cache clear confirmation dialog
* Renamed the reset button to "Default Location" to clarify its function
Related JIRAs:
ER-815
ER-816
ER-818
ER-820
ER-821
ER-831
Diffstat (limited to 'indra/newview/llappviewer.cpp')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7e682fc83b..53c075450a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3586,10 +3586,12 @@ bool LLAppViewer::initCache() // Init the texture cache // Allocate 80% of the cache size for textures const S32 MB = 1024 * 1024; - S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB; - const S64 MAX_CACHE_SIZE = 10 * 1024ll * MB; + const S64 MIN_CACHE_SIZE = 64 * MB; + const S64 MAX_CACHE_SIZE = 9984ll * MB; const S64 MAX_VFS_SIZE = 1024 * MB; // 1 GB - cache_size = llmin(cache_size, MAX_CACHE_SIZE); + + S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB; + cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE); S64 texture_cache_size = ((cache_size * 8) / 10); S64 vfs_size = cache_size - texture_cache_size; |
