diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-01-23 17:49:09 +0200 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-01-23 17:49:09 +0200 |
commit | f324e67780cb002149b11d0fbf49f5d1794b7299 (patch) | |
tree | 6081193e12a021394c0ccd3cd62960bd8f498b11 | |
parent | b2ef7661a0893d4da884849236441d9ab0552606 (diff) |
EXP-1801 FIXED Fixed the "snapshot to disk" shortcut (Ctrl+`) to respect preferred snapshot format.
Restoring mistakenly removed code.
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7e830e14bf..8ee514e7c2 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -527,8 +527,22 @@ class LLFileTakeSnapshotToDisk : public view_listener_t FALSE)) { gViewerWindow->playSnapshotAnimAndSound(); - - LLPointer<LLImageFormatted> formatted = new LLImagePNG; + LLPointer<LLImageFormatted> formatted; + switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) + { + case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: + formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: + formatted = new LLImagePNG; + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: + formatted = new LLImageBMP; + break; + default: + llwarns << "Unknown Local Snapshot format" << llendl; + return true; + } formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize() ; |