Commit 9303c94a authored by NiranV's avatar NiranV
Browse files

Fixed: Compile.

parent 23c35875
......@@ -112,7 +112,7 @@ void LLAudioEngine::setDefaults()
}
bool LLAudioEngine::init(const S32 num_channels, void* userdata)
bool LLAudioEngine::init(const S32 num_channels, void* userdata, const std::string &app_title)
{
setDefaults();
......
......@@ -99,7 +99,7 @@ class LLAudioEngine
virtual ~LLAudioEngine();
// initialization/startup/shutdown
virtual bool init(const S32 num_channels, void *userdata);
virtual bool init(const S32 num_channels, void *userdata, const std::string &app_title);
virtual std::string getDriverName(bool verbose) = 0;
virtual void shutdown();
......
......@@ -74,7 +74,7 @@ inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string)
return true;
}
bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata)
bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata, const std::string &app_title)
{
U32 version;
FMOD_RESULT result;
......@@ -86,7 +86,7 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata)
return false;
//will call LLAudioEngine_FMODSTUDIO::allocateListener, which needs a valid mSystem pointer.
LLAudioEngine::init(num_channels, userdata);
LLAudioEngine::init(num_channels, userdata, app_title);
result = mSystem->getVersion(&version);
Check_FMOD_Error(result, "FMOD::System::getVersion");
......
......@@ -57,7 +57,7 @@ class LLAudioEngine_FMODSTUDIO final : public LLAudioEngine
virtual ~LLAudioEngine_FMODSTUDIO();
// initialization/startup/shutdown
bool init(const S32 num_channels, void *user_data) final override;
bool init(const S32 num_channels, void *user_data, const std::string &app_title) final override;
std::string getDriverName(bool verbose) final override;
void allocateListener() final override;
......
......@@ -46,8 +46,6 @@ LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
{
}
// virtual
bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata)
LLAudioEngine_OpenAL::~LLAudioEngine_OpenAL()
{
}
......
......@@ -38,7 +38,7 @@ class LLAudioEngine_OpenAL : public LLAudioEngine
{
public:
LLAudioEngine_OpenAL();
virtual ~LLAudioEngine_OpenAL() = default;
virtual ~LLAudioEngine_OpenAL();
virtual bool init(const S32 num_channels, void *user_data, const std::string &app_title);
virtual std::string getDriverName(bool verbose);
......
......@@ -114,8 +114,6 @@ class LLMatrix3a
LL_ALIGN_16(LLVector4a mColumns[3]);
};
static_assert(std::is_trivial<LLMatrix3a>::value, "LLMatrix3a must be a trivial type");
static_assert(std::is_standard_layout<LLMatrix3a>::value, "LLMatrix3a must be a standard layout type");
class LLRotation : public LLMatrix3a
{
......@@ -126,7 +124,5 @@ class LLRotation : public LLMatrix3a
// Returns true if this rotation is orthonormal with det ~= 1
inline bool isOkRotation() const;
};
static_assert(std::is_trivial<LLRotation>::value, "LLRotation must be a trivial type");
static_assert(std::is_standard_layout<LLRotation>::value, "LLRotation must be a standard layout type");
#endif
......@@ -153,9 +153,6 @@ class LLMatrix4a
}
};
static_assert(std::is_trivial<LLMatrix4a>::value, "LLMatrix4a must be a trivial type");
static_assert(std::is_standard_layout<LLMatrix4a>::value, "LLMatrix4a must be a standard layout type");
inline LLVector4a rowMul(const LLVector4a &row, const LLMatrix4a &mat)
{
LLVector4a result;
......
......@@ -104,7 +104,4 @@ class LLPlane
LLVector4a mV;
} LL_ALIGN_POSTFIX(16);
static_assert(std::is_trivial<LLPlane>::value, "LLPlane must be a trivial type");
static_assert(std::is_standard_layout<LLPlane>::value, "LLPlane must be a standard layout type");
#endif // LL_LLPLANE_H
......@@ -101,7 +101,5 @@ class LLQuaternion2
LLVector4a mQ;
};
static_assert(std::is_trivial<LLQuaternion2>::value, "LLQuaternion2 must be a trivial type");
static_assert(std::is_standard_layout<LLQuaternion2>::value, "LLQuaternion2 must be a standard layout type");
#endif
......@@ -324,9 +324,6 @@ struct LLVector4a
LLQuad mQ;
} LL_ALIGN_POSTFIX(16);
static_assert(std::is_trivial<LLVector4a>::value, "LLVector4a must be a trivial type");
static_assert(std::is_standard_layout<LLVector4a>::value, "LLVector4a must be a standard layout type");
inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p)
{
min.setMin(min, p);
......
......@@ -1365,6 +1365,7 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("alpha_ramp");
mReservedUniforms.push_back("origin");
mReservedUniforms.push_back("display_gamma");
mReservedUniforms.push_back("inscatter");
mReservedUniforms.push_back("sun_size");
......
......@@ -217,6 +217,7 @@ class LLShaderMgr
TERRAIN_ALPHARAMP,
SHINY_ORIGIN,
DISPLAY_GAMMA,
INSCATTER_RT,
SUN_SIZE,
......
......@@ -1275,8 +1275,8 @@ bool LLAppViewer::init()
LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLFloaterIMContainer::onCurrentChannelChanged, _1), true);
/*----------------------------------------------------------------------*/
gSavedSettings.getControl("FramePerSecondLimit")->getSignal()->connect(boost::bind(&LLAppViewer::onChangeFrameLimit, this, _2));
onChangeFrameLimit(gSavedSettings.getLLSD("FramePerSecondLimit"));
//gSavedSettings.getControl("FramePerSecondLimit")->getSignal()->connect(boost::bind(&LLAppViewer::onChangeFrameLimit, this, _2));
//onChangeFrameLimit(gSavedSettings.getLLSD("FramePerSecondLimit"));
//BD
gJoystick->setNeedsReset(true);
......@@ -3198,7 +3198,6 @@ LLSD LLAppViewer::getViewerInfo() const
if (RlvActions::canShowLocation())
{
// [/RLVa:KB]
LLVector3d pos = gAgent.getPositionGlobal();
LLVector3d pos = gAgent.getPositionGlobal();
info["POSITION"] = ll_sd_from_vector3d(pos);
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
......
......@@ -2805,7 +2805,7 @@ void LLFace::setDefaultTexture(U32 nChannel, bool fShowDefault) const
if ((fUpdated) && (mDrawablep))
{
gPipeline.markTextured(mDrawablep);
const_cast<LLDrawable*>(mDrawablep.get())->updateTexture();
mDrawablep->updateTexture();
}
}
......
......@@ -266,15 +266,6 @@ void LLFloaterBuyCurrencyUI::onClickCancel()
LLSidepanelInventory::sendMoneyBalanceRequest();
}
void LLFloaterBuyCurrencyUI::onClickErrorWeb()
{
LLWeb::loadURL(mManager.errorURI());
closeFloater();
// Update L$ balance
//BD
LLSidepanelInventory::sendMoneyBalanceRequest();
}
// static
void LLFloaterBuyCurrency::buyCurrency()
{
......
......@@ -895,7 +895,7 @@ BOOL LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks, MASK mask)
{
if (mPreviewRect.pointInRect(x, y) && mModelPreview)
{
......@@ -904,7 +904,7 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
}
else
{
LLFloaterModelUploadBase::handleScrollWheel(x, y, clicks);
LLFloaterModelUploadBase::handleScrollWheel(x, y, clicks, mask);
}
return TRUE;
}
......
......@@ -3548,22 +3548,6 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
getChildView("send_im_to_email")->setEnabled(is_verified_email);
}
void LLFloaterPreference::updateMaxComplexity()
{
// Called when the IndirectMaxComplexity control changes
LLAvatarComplexityControls::updateMax(
getChild<LLSliderCtrl>("IndirectMaxComplexity"),
getChild<LLTextBox>("IndirectMaxComplexityText"));
LLFloaterPreferenceGraphicsAdvanced* floater_graphics_advanced = LLFloaterReg::findTypedInstance<LLFloaterPreferenceGraphicsAdvanced>("prefs_graphics_advanced");
if (floater_graphics_advanced)
{
LLAvatarComplexityControls::updateMax(
floater_graphics_advanced->getChild<LLSliderCtrl>("IndirectMaxComplexity"),
floater_graphics_advanced->getChild<LLTextBox>("IndirectMaxComplexityText"));
}
}
bool LLFloaterPreference::loadFromFilename(const std::string& filename, std::map<std::string, std::string> &label_map)
{
LLXMLNodePtr root;
......@@ -3603,36 +3587,6 @@ bool LLFloaterPreference::loadFromFilename(const std::string& filename, std::map
return true;
}
void LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity()
{
// Called when the IndirectMaxComplexity control changes
LLAvatarComplexityControls::updateMax(
getChild<LLSliderCtrl>("IndirectMaxComplexity"),
getChild<LLTextBox>("IndirectMaxComplexityText"));
LLFloaterPreference* floater_preferences = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (floater_preferences)
{
LLAvatarComplexityControls::updateMax(
floater_preferences->getChild<LLSliderCtrl>("IndirectMaxComplexity"),
floater_preferences->getChild<LLTextBox>("IndirectMaxComplexityText"));
}
}
void LLFloaterPreference::onChangeMaturity()
{
U8 sim_access = gSavedSettings.getU32("PreferredMaturity");
getChild<LLIconCtrl>("rating_icon_general")->setVisible(sim_access == SIM_ACCESS_PG
|| sim_access == SIM_ACCESS_MATURE
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_moderate")->setVisible(sim_access == SIM_ACCESS_MATURE
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
}
std::string get_category_path(LLUUID cat_id)
{
LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
......
......@@ -48,6 +48,7 @@
#include "llsidepanelinventory.h"
#include "llstartup.h"
#include "lltrans.h"
#include "llviewerassettype.h"
#include "llviewerattachmenu.h"
#include "llviewerfoldertype.h"
#include "llvoavatarself.h"
......@@ -477,6 +478,180 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState()
return getFilter().getShowFolderState();
}
void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item)
{
LLFolderViewItem* view_item = getItemByID(item_id);
LLFolderViewModelItemInventory* viewmodel_item =
static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL);
// LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item
// to folder is the fast way to get a folder without searching through folders tree.
LLFolderViewFolder* view_folder = NULL;
// Check requires as this item might have already been deleted
// as a child of its deleted parent.
if (model_item && view_item)
{
view_folder = dynamic_cast<LLFolderViewFolder*>(view_item);
}
//////////////////////////////
// LABEL Operation
// Empty out the display name for relabel.
if (mask & LLInventoryObserver::LABEL)
{
if (view_item)
{
// Request refresh on this item (also flags for filtering)
LLInvFVBridge* bridge = (LLInvFVBridge*)view_item->getViewModelItem();
if (bridge)
{
// Clear the display name first, so it gets properly re-built during refresh()
bridge->clearDisplayName();
view_item->refresh();
}
LLFolderViewFolder* parent = view_item->getParentFolder();
if (parent)
{
parent->getViewModelItem()->dirtyDescendantsFilter();
}
}
}
//////////////////////////////
// REBUILD Operation
// Destroy and regenerate the UI.
if (mask & LLInventoryObserver::REBUILD)
{
if (model_item && view_item && viewmodel_item)
{
const LLUUID& idp = viewmodel_item->getUUID();
view_item->destroyView();
removeItemID(idp);
}
view_item = buildNewViews(item_id);
viewmodel_item =
static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL);
view_folder = dynamic_cast<LLFolderViewFolder *>(view_item);
}
//////////////////////////////
// INTERNAL Operation
// This could be anything. For now, just refresh the item.
if (mask & LLInventoryObserver::INTERNAL)
{
if (view_item)
{
view_item->refresh();
}
}
//////////////////////////////
// SORT Operation
// Sort the folder.
if (mask & LLInventoryObserver::SORT)
{
if (view_folder)
{
view_folder->getViewModelItem()->requestSort();
}
}
// We don't typically care which of these masks the item is actually flagged with, since the masks
// may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into
// Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks
// panel). What's relevant is that the item and UI are probably out of sync and thus need to be
// resynchronized.
if (mask & (LLInventoryObserver::STRUCTURE |
LLInventoryObserver::ADD |
LLInventoryObserver::REMOVE))
{
//////////////////////////////
// ADD Operation
// Item exists in memory but a UI element hasn't been created for it.
if (model_item && !view_item)
{
// Add the UI element for this item.
buildNewViews(item_id);
// Select any newly created object that has the auto rename at top of folder root set.
if (mFolderRoot.get()->getRoot()->needsAutoRename())
{
setSelection(item_id, FALSE);
}
updateFolderLabel(model_item->getParentUUID());
}
//////////////////////////////
// STRUCTURE Operation
// This item already exists in both memory and UI. It was probably reparented.
else if (model_item && view_item)
{
LLFolderViewFolder* old_parent = view_item->getParentFolder();
// Don't process the item if it is the root
if (old_parent)
{
LLFolderViewModelItemInventory* viewmodel_folder = static_cast<LLFolderViewModelItemInventory*>(old_parent->getViewModelItem());
LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID());
// Item has been moved.
if (old_parent != new_parent)
{
if (new_parent != NULL)
{
// Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
view_item->addToFolder(new_parent);
addItemID(viewmodel_item->getUUID(), view_item);
if (mInventory)
{
const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH);
if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen())
{
setSelection(item_id, FALSE);
}
}
updateFolderLabel(model_item->getParentUUID());
}
else
{
// Remove the item ID before destroying the view because the view-model-item gets
// destroyed when the view is destroyed
removeItemID(viewmodel_item->getUUID());
// Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that
// doesn't include trash). Just remove the item's UI.
view_item->destroyView();
}
if (viewmodel_folder)
{
updateFolderLabel(viewmodel_folder->getUUID());
}
old_parent->getViewModelItem()->dirtyDescendantsFilter();
}
}
}
//////////////////////////////
// REMOVE Operation
// This item has been removed from memory, but its associated UI element still exists.
else if (!model_item && view_item && viewmodel_item)
{
// Remove the item's UI.
LLFolderViewFolder* parent = view_item->getParentFolder();
removeItemID(viewmodel_item->getUUID());
view_item->destroyView();
if (parent)
{
parent->getViewModelItem()->dirtyDescendantsFilter();
LLFolderViewModelItemInventory* viewmodel_folder = static_cast<LLFolderViewModelItemInventory*>(parent->getViewModelItem());
if (viewmodel_folder)
{
updateFolderLabel(viewmodel_folder->getUUID());
}
}
}
}
}
// Called when something changed in the global model (new item, item coming through the wire, rename, move, etc...) (CHUI-849)
static LLTrace::BlockTimerStatHandle FTM_REFRESH("Inventory Refresh");
void LLInventoryPanel::modelChanged(U32 mask)
......
......@@ -327,6 +327,7 @@ class LLInventoryPanel : public LLPanel
virtual LLFolderViewItem* buildNewViews(const LLUUID& id);
LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp);
virtual void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item);
BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const;
virtual LLFolderView * createFolderRoot(LLUUID root_id );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment