summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotinventory.cpp
diff options
context:
space:
mode:
authorAyane <chanayane83@gmail.com>2024-07-17 01:47:22 +0200
committerGitHub <noreply@github.com>2024-07-17 02:47:22 +0300
commitbd0baebb6eea478260880d04e34f6b3181d883a6 (patch)
treec282e22c3a2f709e878197c936b380c500608685 /indra/newview/llpanelsnapshotinventory.cpp
parentb05ab692ba60438e3900b351d654bc0124a42f50 (diff)
Raised the 512x512 limitation for uploading snapshots to inventory to 2048x2048 (#2025)
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index 4abb89120b..96b17acc40 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -155,7 +155,19 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
void LLPanelSnapshotInventoryBase::onSend()
{
- S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
+ S32 w = 0;
+ S32 h = 0;
+
+ if( mSnapshotFloater )
+ {
+ LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView();
+ if( preview )
+ {
+ preview->getSize(w, h);
+ }
+ }
+
+ S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h);
if (can_afford_transaction(expected_upload_cost))
{
if (mSnapshotFloater)