aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerimagelist.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:46:01 -0500
committerJacek Antonelli2008-08-15 23:46:01 -0500
commitae88605f72ef43be7b619b8c1c11a508ebae5057 (patch)
treef27474fe2d1186124211e2a5b2ad31927a3ab5bc /linden/indra/newview/llviewerimagelist.cpp
parentSecond Life viewer sources 1.20.13 (diff)
downloadmeta-impy-ae88605f72ef43be7b619b8c1c11a508ebae5057.zip
meta-impy-ae88605f72ef43be7b619b8c1c11a508ebae5057.tar.gz
meta-impy-ae88605f72ef43be7b619b8c1c11a508ebae5057.tar.bz2
meta-impy-ae88605f72ef43be7b619b8c1c11a508ebae5057.tar.xz
Second Life viewer sources 1.20.14
Diffstat (limited to 'linden/indra/newview/llviewerimagelist.cpp')
-rw-r--r--linden/indra/newview/llviewerimagelist.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp
index 6f0605c..3ff0013 100644
--- a/linden/indra/newview/llviewerimagelist.cpp
+++ b/linden/indra/newview/llviewerimagelist.cpp
@@ -321,8 +321,10 @@ LLViewerImage* LLViewerImageList::getImageFromFile(const LLString& filename,
321 return getImage(IMG_DEFAULT, TRUE, TRUE); 321 return getImage(IMG_DEFAULT, TRUE, TRUE);
322 } 322 }
323 323
324 if (filename.empty()) 324 std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
325 if (full_path.empty())
325 { 326 {
327 llwarns << "Failed to find local image file: " << filename << llendl;
326 return getImage(IMG_DEFAULT, TRUE, TRUE); 328 return getImage(IMG_DEFAULT, TRUE, TRUE);
327 } 329 }
328 330
@@ -334,14 +336,14 @@ LLViewerImage* LLViewerImageList::getImageFromFile(const LLString& filename,
334 } 336 }
335 else 337 else
336 { 338 {
337 new_id.generate(std::string(filename)); 339 new_id.generate(std::string(full_path));
338 } 340 }
339 341
340 LLPointer<LLViewerImage> imagep = hasImage(new_id); 342 LLPointer<LLViewerImage> imagep = hasImage(new_id);
341 343
342 if (imagep.isNull()) 344 if (imagep.isNull())
343 { 345 {
344 imagep = new LLViewerImage(filename, new_id, usemipmaps); 346 imagep = new LLViewerImage(full_path, new_id, usemipmaps);
345 347
346 if (internal_format && primary_format) 348 if (internal_format && primary_format)
347 { 349 {
@@ -1386,7 +1388,7 @@ bool LLUIImageList::initFromFile()
1386 1388
1387 if (pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload")) 1389 if (pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload"))
1388 { 1390 {
1389 gImageList.decodeAllImages(2.f); // decode preloaded images 1391 gImageList.decodeAllImages(10.f); // decode preloaded images
1390 } 1392 }
1391 } 1393 }
1392 return true; 1394 return true;