diff options
author | Ayane <chanayane83@gmail.com> | 2024-07-17 01:47:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-17 02:47:22 +0300 |
commit | bd0baebb6eea478260880d04e34f6b3181d883a6 (patch) | |
tree | c282e22c3a2f709e878197c936b380c500608685 /indra/newview/llpanelsnapshotinventory.cpp | |
parent | b05ab692ba60438e3900b351d654bc0124a42f50 (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.cpp | 14 |
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) |