summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/integration_tests/llui_libtest/llwidgetreg.cpp2
-rw-r--r--indra/llaudio/llstreamingaudio_fmod.cpp2
-rw-r--r--indra/llcommon/llcommonutils.h5
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llaccordionctrl.cpp20
-rw-r--r--indra/llui/llaccordionctrltab.cpp3
-rw-r--r--indra/llui/llflatlistview.cpp6
-rw-r--r--indra/llui/llfloater.h4
-rw-r--r--indra/llui/lllineeditor.cpp2
-rw-r--r--indra/llui/llloadingindicator.cpp135
-rw-r--r--indra/llui/llloadingindicator.h93
-rw-r--r--indra/llui/llui.cpp4
-rw-r--r--indra/llui/lluictrlfactory.cpp5
-rw-r--r--indra/llui/lluifwd.h1
-rw-r--r--indra/llui/llurlentry.cpp32
-rw-r--r--indra/llui/llurlentry.h15
-rw-r--r--indra/llui/llurlregistry.cpp6
-rw-r--r--indra/llwindow/llwindowwin32.cpp7
-rw-r--r--indra/mac_updater/CMakeLists.txt14
-rw-r--r--indra/mac_updater/mac_updater.cpp57
-rw-r--r--indra/media_plugins/CMakeLists.txt4
-rw-r--r--indra/media_plugins/webkit/windows_volume_catcher.cpp246
-rw-r--r--indra/media_plugins/winmmshim/CMakeLists.txt34
-rw-r--r--indra/media_plugins/winmmshim/forwarding_api.cpp1460
-rw-r--r--indra/media_plugins/winmmshim/forwarding_api.h395
-rw-r--r--indra/media_plugins/winmmshim/winmm.def218
-rw-r--r--indra/media_plugins/winmmshim/winmm_shim.cpp192
-rw-r--r--indra/newview/CMakeLists.txt7
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llagent.cpp5
-rw-r--r--indra/newview/llagentwearables.cpp33
-rw-r--r--indra/newview/llagentwearables.h2
-rw-r--r--indra/newview/llappearancemgr.cpp153
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llavatarlist.cpp18
-rw-r--r--indra/newview/llchiclet.h3
-rw-r--r--indra/newview/llcofwearables.cpp153
-rw-r--r--indra/newview/llcofwearables.h66
-rw-r--r--indra/newview/llfloaterbuyland.cpp9
-rw-r--r--indra/newview/llimview.cpp2
-rw-r--r--indra/newview/llinventoryitemslist.cpp74
-rw-r--r--indra/newview/llinventoryitemslist.h36
-rw-r--r--indra/newview/llinventoryobserver.cpp30
-rw-r--r--indra/newview/llnavigationbar.cpp1
-rw-r--r--indra/newview/lloutfitslist.cpp139
-rw-r--r--indra/newview/lloutfitslist.h27
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp3
-rw-r--r--indra/newview/llpanelgroupnotices.cpp16
-rw-r--r--indra/newview/llpaneloutfitedit.cpp156
-rw-r--r--indra/newview/llpaneloutfitedit.h10
-rw-r--r--indra/newview/llteleporthistory.cpp12
-rw-r--r--indra/newview/llteleporthistorystorage.cpp7
-rw-r--r--indra/newview/lltoastalertpanel.cpp14
-rw-r--r--indra/newview/llvieweraudio.cpp4
-rw-r--r--indra/newview/llviewerinventory.cpp67
-rw-r--r--indra/newview/llviewermessage.cpp44
-rw-r--r--indra/newview/llviewerregion.cpp20
-rw-r--r--indra/newview/llviewerregion.h3
-rw-r--r--indra/newview/llwearableitemslist.cpp5
-rw-r--r--indra/newview/llwearableitemslist.h19
-rw-r--r--indra/newview/llwearablelist.cpp4
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_1.pngbin0 -> 464 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_10.pngbin0 -> 461 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_11.pngbin0 -> 471 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_12.pngbin0 -> 457 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_2.pngbin0 -> 461 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_3.pngbin0 -> 487 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_4.pngbin0 -> 466 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_5.pngbin0 -> 477 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_6.pngbin0 -> 460 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_7.pngbin0 -> 483 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_8.pngbin0 -> 467 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_9.pngbin0 -> 483 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml13
-rw-r--r--indra/newview/skins/default/xui/de/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_buy_object.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_object.xml7
-rw-r--r--indra/newview/skins/default/xui/en/floater_outgoing_call.xml2
-rw-r--r--indra/newview/skins/default/xui/en/mime_types.xml32
-rw-r--r--indra/newview/skins/default/xui/en/mime_types_linux.xml32
-rw-r--r--indra/newview/skins/default/xui/en/mime_types_mac.xml30
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/en/outfit_accordion_tab.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_cof_wearables.xml65
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml53
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/loading_indicator.xml8
-rw-r--r--indra/newview/skins/default/xui/es/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/it/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/floater_about_land.xml2
-rwxr-xr-xindra/newview/viewer_manifest.py6
97 files changed, 3803 insertions, 618 deletions
diff --git a/indra/integration_tests/llui_libtest/llwidgetreg.cpp b/indra/integration_tests/llui_libtest/llwidgetreg.cpp
index c6e2e79a09..57c39243fb 100644
--- a/indra/integration_tests/llui_libtest/llwidgetreg.cpp
+++ b/indra/integration_tests/llui_libtest/llwidgetreg.cpp
@@ -37,6 +37,7 @@
#include "llcombobox.h"
#include "llcontainerview.h"
#include "lliconctrl.h"
+#include "llloadingindicator.h"
#include "llmenubutton.h"
#include "llmenugl.h"
#include "llmultislider.h"
@@ -72,6 +73,7 @@ void LLWidgetReg::initClass(bool register_widgets)
LLDefaultChildRegistry::Register<LLFlyoutButton> flyout_button("flyout_button");
LLDefaultChildRegistry::Register<LLContainerView> container_view("container_view");
LLDefaultChildRegistry::Register<LLIconCtrl> icon("icon");
+ LLDefaultChildRegistry::Register<LLLoadingIndicator> loading_indicator("loading_indicator");
LLDefaultChildRegistry::Register<LLLineEditor> line_editor("line_editor");
LLDefaultChildRegistry::Register<LLMenuItemSeparatorGL> menu_item_separator("menu_item_separator");
LLDefaultChildRegistry::Register<LLMenuItemCallGL> menu_item_call_gl("menu_item_call");
diff --git a/indra/llaudio/llstreamingaudio_fmod.cpp b/indra/llaudio/llstreamingaudio_fmod.cpp
index a4620fa13c..fe94688565 100644
--- a/indra/llaudio/llstreamingaudio_fmod.cpp
+++ b/indra/llaudio/llstreamingaudio_fmod.cpp
@@ -271,7 +271,7 @@ void LLStreamingAudio_FMOD::setGain(F32 vol)
if (mFMODInternetStreamChannel != -1)
{
- vol = llclamp(vol, 0.f, 1.f);
+ vol = llclamp(vol * vol, 0.f, 1.f);
int vol_int = llround(vol * 255.f);
FSOUND_SetVolumeAbsolute(mFMODInternetStreamChannel, vol_int);
}
diff --git a/indra/llcommon/llcommonutils.h b/indra/llcommon/llcommonutils.h
index f769ab87d3..ad0d884e37 100644
--- a/indra/llcommon/llcommonutils.h
+++ b/indra/llcommon/llcommonutils.h
@@ -38,6 +38,11 @@ namespace LLCommonUtils
* Computes difference between 'vnew' and 'vcur' vectors.
* Items present in 'vnew' and missing in 'vcur' are treated as added and are copied into 'vadded'
* Items missing in 'vnew' and present in 'vcur' are treated as removed and are copied into 'vremoved'
+ *
+ * @param vnew[in] - incoming IDs
+ * @param vcur[in] - current IDs
+ * @param vadded[out] - difference between incoming and current IDS - added IDs
+ * @param vremoved[out] - difference between incoming and current IDS - removed IDs
*/
LL_COMMON_API void computeDifference(
const uuid_vec_t& vnew,
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 532b6b6524..3ecab90756 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -52,6 +52,7 @@ set(llui_SOURCE_FILES
llkeywords.cpp
lllayoutstack.cpp
lllineeditor.cpp
+ llloadingindicator.cpp
lllocalcliprect.cpp
llmenubutton.cpp
llmenugl.cpp
@@ -144,6 +145,7 @@ set(llui_HEADER_FILES
lllayoutstack.h
lllazyvalue.h
lllineeditor.h
+ llloadingindicator.h
lllocalcliprect.h
llmenubutton.h
llmenugl.h
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 136fd2a9ac..5d1d57cbb2 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -329,7 +329,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);
if(!accordion_tab)
return;
- if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) == getChildList()->end())
+ if(std::find(beginChild(), endChild(), accordion_tab) == endChild())
addChild(accordion_tab);
mAccordionTabs.push_back(accordion_tab);
@@ -343,7 +343,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
if(!accordion_tab)
return;
- if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) != getChildList()->end())
+ if(std::find(beginChild(), endChild(), accordion_tab) != endChild())
removeChild(accordion_tab);
for (std::vector<LLAccordionCtrlTab*>::iterator iter = mAccordionTabs.begin();
@@ -668,15 +668,23 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
if(accordion_tab->hasFocus() && i>0)
{
+ bool prev_visible_tab_found = false;
while(i>0)
{
if(mAccordionTabs[--i]->getVisible())
+ {
+ prev_visible_tab_found = true;
break;
+ }
}
-
- accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
- accordion_tab->notify(LLSD().with("action","select_last"));
- return 1;
+
+ if (prev_visible_tab_found)
+ {
+ accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+ accordion_tab->notify(LLSD().with("action","select_last"));
+ return 1;
+ }
+ break;
}
}
return 0;
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index d389236642..3c706ce90e 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -554,7 +554,8 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info)
}
//LLAccordionCtrl should rearrange accodion tab if one of accordion change its size
- getParent()->notifyParent(info);
+ if (getParent()) // A parent may not be set if tabs are added dynamically.
+ getParent()->notifyParent(info);
return 1;
}
else if(str_action == "select_prev")
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 990bf5cd22..e0b2244654 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -744,12 +744,18 @@ LLRect LLFlatListView::getLastSelectedItemRect()
void LLFlatListView::selectFirstItem ()
{
+ // No items - no actions!
+ if (mItemPairs.empty()) return;
+
selectItemPair(mItemPairs.front(), true);
ensureSelectedVisible();
}
void LLFlatListView::selectLastItem ()
{
+ // No items - no actions!
+ if (mItemPairs.empty()) return;
+
selectItemPair(mItemPairs.back(), true);
ensureSelectedVisible();
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 403723d9d8..444711de81 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -432,11 +432,15 @@ private:
class LLFloaterView : public LLUICtrl
{
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>{};
+
protected:
LLFloaterView (const Params& p);
friend class LLUICtrlFactory;
public:
+
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 843f72d8e4..45f9de8e8d 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -1440,7 +1440,7 @@ BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char)
BOOL LLLineEditor::canDoDelete() const
{
- return ( !mReadOnly && (!mPassDelete || (hasSelection() || (getCursor() < mText.length()))) );
+ return ( !mReadOnly && mText.length() > 0 && (!mPassDelete || (hasSelection() || (getCursor() < mText.length()))) );
}
void LLLineEditor::doDelete()
diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp
new file mode 100644
index 0000000000..8dec6ea9df
--- /dev/null
+++ b/indra/llui/llloadingindicator.cpp
@@ -0,0 +1,135 @@
+/**
+ * @file llloadingindicator.cpp
+ * @brief Perpetual loading indicator
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llloadingindicator.h"
+
+// Linden library includes
+#include "llsingleton.h"
+
+// Project includes
+#include "lluictrlfactory.h"
+#include "lluiimage.h"
+
+static LLDefaultChildRegistry::Register<LLLoadingIndicator> r("loading_indicator");
+
+///////////////////////////////////////////////////////////////////////////////
+// LLLoadingIndicator::Data class
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Pre-loaded images shared by all instances of the widget
+ */
+class LLLoadingIndicator::Data: public LLSingleton<LLLoadingIndicator::Data>
+{
+public:
+ /*virtual*/ void initSingleton(); // from LLSingleton
+
+ LLPointer<LLUIImage> getNextImage(S8& idx) const;
+ U8 getImagesCount() const { return NIMAGES; }
+private:
+
+ static const U8 NIMAGES = 12;
+ LLPointer<LLUIImage> mImages[NIMAGES];
+};
+
+// virtual
+// Called right after the instance gets constructed.
+void LLLoadingIndicator::Data::initSingleton()
+{
+ // Load images.
+ for (U8 i = 0; i < NIMAGES; ++i)
+ {
+ std::string img_name = llformat("Progress_%d", i+1);
+ mImages[i] = LLUI::getUIImage(img_name, 0);
+ llassert(mImages[i]);
+ }
+}
+
+LLPointer<LLUIImage> LLLoadingIndicator::Data::getNextImage(S8& idx) const
+{
+ // Actually selects previous image because
+ // current images seem to be in wrong order;
+ // performs array bounds checking.
+ idx = idx > 0 ? llmin(NIMAGES-1, idx-1) : NIMAGES-1;
+ return mImages[idx];
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// LLLoadingIndicator class
+///////////////////////////////////////////////////////////////////////////////
+
+LLLoadingIndicator::LLLoadingIndicator(const Params& p)
+: LLUICtrl(p)
+ , mRotationsPerSec(p.rotations_per_sec > 0 ? p.rotations_per_sec : 1.0f)
+ , mCurImageIdx(-1)
+{
+ // Select initial image.
+ mCurImagep = Data::instance().getNextImage(mCurImageIdx);
+
+ // Start timer for switching images.
+ start();
+}
+
+void LLLoadingIndicator::draw()
+{
+ // Time to switch to the next image?
+ if (mImageSwitchTimer.getStarted() && mImageSwitchTimer.hasExpired())
+ {
+ // Switch to the next image.
+ mCurImagep = Data::instance().getNextImage(mCurImageIdx);
+
+ // Restart timer.
+ start();
+ }
+
+ // Draw current image.
+ if( mCurImagep.notNull() )
+ {
+ mCurImagep->draw(getLocalRect(), LLColor4::white % getDrawContext().mAlpha);
+ }
+
+ LLUICtrl::draw();
+}
+
+void LLLoadingIndicator::stop()
+{
+ mImageSwitchTimer.stop();
+}
+
+void LLLoadingIndicator::start()
+{
+ mImageSwitchTimer.start();
+ F32 period = 1.0f / (Data::instance().getImagesCount() * mRotationsPerSec);
+ mImageSwitchTimer.setTimerExpirySec(period);
+}
diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h
new file mode 100644
index 0000000000..32dd1fead8
--- /dev/null
+++ b/indra/llui/llloadingindicator.h
@@ -0,0 +1,93 @@
+/**
+ * @file llloadingindicator.h
+ * @brief Perpetual loading indicator
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLLOADINGINDICATOR_H
+#define LL_LLLOADINGINDICATOR_H
+
+#include "lluictrl.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// class LLLoadingIndicator
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Perpetual loading indicator (a la MacOSX or YouTube)
+ *
+ * Number of rotations per second can be overriden
+ * with the "roations_per_sec" parameter.
+ *
+ * Can start/stop spinning.
+ *
+ * @see start()
+ * @see stop()
+ */
+class LLLoadingIndicator
+: public LLUICtrl
+{
+ LOG_CLASS(LLLoadingIndicator);
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<F32> rotations_per_sec;
+ Params()
+ : rotations_per_sec("rotations_per_sec", 1.0f)
+ {}
+ };
+
+ virtual ~LLLoadingIndicator() {}
+
+ // llview overrides
+ virtual void draw();
+
+ /**
+ * Stop spinning.
+ */
+ void stop();
+
+ /**
+ * Start spinning.
+ */
+ void start();
+
+private:
+ LLLoadingIndicator(const Params&);
+ friend class LLUICtrlFactory;
+
+ class Data;
+
+ F32 mRotationsPerSec;
+ S8 mCurImageIdx;
+ LLPointer<LLUIImage> mCurImagep;
+ LLFrameTimer mImageSwitchTimer;
+};
+
+#endif // LL_LLLOADINGINDICATOR_H
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index f9a4ed7285..bf12384a28 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -56,6 +56,7 @@
#include "llfloaterreg.h"
#include "llmenugl.h"
#include "llmenubutton.h"
+#include "llloadingindicator.h"
#include "llwindow.h"
// for registration
@@ -94,7 +95,10 @@ std::list<std::string> gUntranslated;
static LLDefaultChildRegistry::Register<LLFilterEditor> register_filter_editor("filter_editor");
static LLDefaultChildRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button");
static LLDefaultChildRegistry::Register<LLSearchEditor> register_search_editor("search_editor");
+
+// register other widgets which otherwise may not be linked in
static LLDefaultChildRegistry::Register<LLMenuButton> register_menu_button("menu_button");
+static LLDefaultChildRegistry::Register<LLLoadingIndicator> register_loading_indicator("loading_indicator");
//
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 27237800d4..930dadc377 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -435,7 +435,10 @@ void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const st
std::string* existing_tag = LLWidgetNameRegistry::instance().getValue(param_block_type);
if (existing_tag != NULL && *existing_tag != tag)
{
- llerrs << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << llendl;
+ std::cerr << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << std::endl;
+ // forcing crash here
+ char* foo = 0;
+ *foo = 1;
}
LLWidgetNameRegistry ::instance().defaultRegistrar().add(param_block_type, tag);
// associate widget type with factory function
diff --git a/indra/llui/lluifwd.h b/indra/llui/lluifwd.h
index f99bb39fdd..d6047b943c 100644
--- a/indra/llui/lluifwd.h
+++ b/indra/llui/lluifwd.h
@@ -39,6 +39,7 @@ class LLComboBox;
class LLDragHandle;
class LLFloater;
class LLIconCtrl;
+class LLLoadingIndicator;
class LLLineEditor;
class LLMenuGL;
class LLPanel;
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 736de651da..3375c13c94 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -765,3 +765,35 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC
{
return getUrl(url);
}
+
+//
+// LLUrlEntryIcon describes an icon with <icon>...</icon> tags
+//
+LLUrlEntryIcon::LLUrlEntryIcon()
+{
+ mPattern = boost::regex("<icon\\s*>\\s*([^<]*)?\\s*</icon\\s*>",
+ boost::regex::perl|boost::regex::icase);
+ mDisabledLink = true;
+}
+
+std::string LLUrlEntryIcon::getUrl(const std::string &url) const
+{
+ return LLStringUtil::null;
+}
+
+std::string LLUrlEntryIcon::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+ return LLStringUtil::null;
+}
+
+std::string LLUrlEntryIcon::getIcon(const std::string &url)
+{
+ // Grep icon info between <icon>...</icon> tags
+ // matches[1] contains the icon name/path
+ boost::match_results<std::string::const_iterator> matches;
+ mIcon = (boost::regex_match(url, matches, mPattern) && matches[1].matched)
+ ? matches[1]
+ : LLStringUtil::null;
+ LLStringUtil::trim(mIcon);
+ return mIcon;
+}
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 29575d752c..71f030677a 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -77,7 +77,7 @@ public:
virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) { return url; }
/// Return an icon that can be displayed next to Urls of this type
- std::string getIcon() const { return mIcon; }
+ virtual std::string getIcon(const std::string &url) { return mIcon; }
/// Return the color to render the displayed text
LLUIColor getColor() const { return mColor; }
@@ -296,4 +296,17 @@ public:
/*virtual*/ std::string getUrl(const std::string &string) const;
};
+///
+/// LLUrlEntryIcon describes an icon with <icon>...</icon> tags
+///
+class LLUrlEntryIcon : public LLUrlEntryBase
+{
+public:
+ LLUrlEntryIcon();
+ /*virtual*/ std::string getUrl(const std::string &string) const;
+ /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+ /*virtual*/ std::string getIcon(const std::string &url);
+};
+
+
#endif
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 0a70aa586a..4341286eb4 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -45,6 +45,7 @@ LLUrlRegistry::LLUrlRegistry()
{
// Urls are matched in the order that they were registered
registerUrl(new LLUrlEntryNoLink());
+ registerUrl(new LLUrlEntryIcon());
registerUrl(new LLUrlEntrySLURL());
registerUrl(new LLUrlEntryHTTP());
registerUrl(new LLUrlEntryHTTPLabel());
@@ -135,7 +136,8 @@ static bool stringHasUrl(const std::string &text)
text.find(".net") != std::string::npos ||
text.find(".edu") != std::string::npos ||
text.find(".org") != std::string::npos ||
- text.find("<nolink>") != std::string::npos);
+ text.find("<nolink>") != std::string::npos ||
+ text.find("<icon") != std::string::npos);
}
bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb)
@@ -177,7 +179,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
match_entry->getUrl(url),
match_entry->getLabel(url, cb),
match_entry->getTooltip(url),
- match_entry->getIcon(),
+ match_entry->getIcon(url),
match_entry->getColor(),
match_entry->getMenuName(),
match_entry->getLocation(url),
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index e2da3d1ad8..a96ad7e796 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2877,8 +2877,13 @@ void LLSplashScreenWin32::updateImpl(const std::string& mesg)
{
if (!mWindow) return;
+ int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), mesg.length(), NULL, 0);
+ if( output_str_len>1024 )
+ return;
+
WCHAR w_mesg[1024];
- mbstowcs(w_mesg, mesg.c_str(), 1024);
+
+ MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), mesg.length(), w_mesg, output_str_len);
SendDlgItemMessage(mWindow,
666, // HACK: text id
diff --git a/indra/mac_updater/CMakeLists.txt b/indra/mac_updater/CMakeLists.txt
index 57d426aa24..44f98e5e18 100644
--- a/indra/mac_updater/CMakeLists.txt
+++ b/indra/mac_updater/CMakeLists.txt
@@ -15,24 +15,10 @@ include_directories(
set(mac_updater_SOURCE_FILES
mac_updater.cpp
- FSCopyObject.c
- GenLinkedList.c
- MoreFilesX.c
)
set(mac_updater_HEADER_FILES
CMakeLists.txt
-
- FSCopyObject.h
- GenLinkedList.h
- MoreFilesX.h
- )
-
-set_source_files_properties(
- FSCopyObject.c
- MoreFilesX.c
- PROPERTIES
- COMPILE_FLAGS -Wno-deprecated-declarations
)
set_source_files_properties(${mac_updater_HEADER_FILES}
diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp
index d2a46d4338..44f002aecf 100644
--- a/indra/mac_updater/mac_updater.cpp
+++ b/indra/mac_updater/mac_updater.cpp
@@ -48,9 +48,6 @@
#include <Carbon/Carbon.h>
-#include "MoreFilesX.h"
-#include "FSCopyObject.h"
-
#include "llerrorcontrol.h"
enum
@@ -547,20 +544,6 @@ bool isDirWritable(FSRef &dir)
return result;
}
-static void utf8str_to_HFSUniStr255(HFSUniStr255 *dest, const char* src)
-{
- llutf16string utf16str = utf8str_to_utf16str(src);
-
- dest->length = utf16str.size();
- if(dest->length > 255)
- {
- // There's onl room for 255 chars in a HFSUniStr25..
- // Truncate to avoid stack smaching or other badness.
- dest->length = 255;
- }
- memcpy(dest->unicode, utf16str.data(), sizeof(UniChar)* dest->length); /* Flawfinder: ignore */
-}
-
static std::string HFSUniStr255_to_utf8str(const HFSUniStr255* src)
{
llutf16string string16((U16*)&(src->unicode), src->length);
@@ -584,19 +567,12 @@ int restoreObject(const char* aside, const char* target, const char* path, const
llinfos << "Copying " << source << " to " << dest << llendl;
- err = FSCopyObject(
+ err = FSCopyObjectSync(
&sourceRef,
&destRef,
- 0,
- kFSCatInfoNone,
- kDupeActionReplace,
- NULL,
- false,
- false,
NULL,
NULL,
- NULL,
- NULL);
+ kFSFileOperationOverwrite);
if(err != noErr) return false;
return true;
@@ -779,21 +755,21 @@ void *updatethreadproc(void*)
// so we need to go up 3 levels to get the path to the main application bundle.
if(err == noErr)
{
- err = FSGetParentRef(&myBundle, &targetRef);
+ err = FSGetCatalogInfo(&myBundle, kFSCatInfoNone, NULL, NULL, NULL, &targetRef);
}
if(err == noErr)
{
- err = FSGetParentRef(&targetRef, &targetRef);
+ err = FSGetCatalogInfo(&targetRef, kFSCatInfoNone, NULL, NULL, NULL, &targetRef);
}
if(err == noErr)
{
- err = FSGetParentRef(&targetRef, &targetRef);
+ err = FSGetCatalogInfo(&targetRef, kFSCatInfoNone, NULL, NULL, NULL, &targetRef);
}
// And once more to get the parent of the target
if(err == noErr)
{
- err = FSGetParentRef(&targetRef, &targetParentRef);
+ err = FSGetCatalogInfo(&targetRef, kFSCatInfoNone, NULL, NULL, NULL, &targetParentRef);
}
if(err == noErr)
@@ -1077,14 +1053,16 @@ void *updatethreadproc(void*)
char aside[MAX_PATH]; /* Flawfinder: ignore */
// this will hold the name of the destination target
- HFSUniStr255 appNameUniStr;
+ CFStringRef appNameRef;
if(replacingTarget)
{
// Get the name of the target we're replacing
+ HFSUniStr255 appNameUniStr;
err = FSGetCatalogInfo(&targetRef, 0, NULL, &appNameUniStr, NULL, NULL);
if(err != noErr)
throw 0;
+ appNameRef = FSCreateStringFromHFSUniStr(NULL, &appNameUniStr);
// Move aside old version (into work directory)
err = FSMoveObject(&targetRef, &tempDirRef, &asideRef);
@@ -1099,7 +1077,7 @@ void *updatethreadproc(void*)
// Construct the name of the target based on the product name
char appName[MAX_PATH]; /* Flawfinder: ignore */
snprintf(appName, sizeof(appName), "%s.app", gProductName);
- utf8str_to_HFSUniStr255( &appNameUniStr, appName );
+ appNameRef = CFStringCreateWithCString(NULL, appName, kCFStringEncodingUTF8);
}
sendProgress(0, 0, CFSTR("Copying files..."));
@@ -1107,19 +1085,12 @@ void *updatethreadproc(void*)
llinfos << "Starting copy..." << llendl;
// Copy the new version from the disk image to the target location.
- err = FSCopyObject(
+ err = FSCopyObjectSync(
&sourceRef,
&targetParentRef,
- 0,
- kFSCatInfoNone,
- kDupeActionStandard,
- &appNameUniStr,
- false,
- false,
- NULL,
- NULL,
+ appNameRef,
&targetRef,
- NULL);
+ kFSFileOperationDefaultOptions);
// Grab the path for later use.
err = FSRefMakePath(&targetRef, (UInt8*)target, sizeof(target));
@@ -1131,7 +1102,7 @@ void *updatethreadproc(void*)
if(err != noErr)
{
// Something went wrong during the copy. Attempt to put the old version back and bail.
- (void)FSDeleteObjects(&targetRef);
+ (void)FSDeleteObject(&targetRef);
if(replacingTarget)
{
(void)FSMoveObject(&asideRef, &targetParentRef, NULL);
diff --git a/indra/media_plugins/CMakeLists.txt b/indra/media_plugins/CMakeLists.txt
index cc03d9cb72..85318aea3b 100644
--- a/indra/media_plugins/CMakeLists.txt
+++ b/indra/media_plugins/CMakeLists.txt
@@ -10,4 +10,8 @@ if (WINDOWS OR DARWIN)
add_subdirectory(quicktime)
endif (WINDOWS OR DARWIN)
+if (WINDOWS)
+ add_subdirectory(winmmshim)
+endif (WINDOWS)
+
add_subdirectory(example)
diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp
index 8debe8fac6..fdff28c2c1 100644
--- a/indra/media_plugins/webkit/windows_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp
@@ -33,262 +33,62 @@
#include "volume_catcher.h"
#include <windows.h>
+#include "llsingleton.h"
-//
-// Abstracts a Win32 mixer line and associated state
-// for muting and changing volume on a given output
-//
-class Mixer
-{
-public:
- static Mixer* create(U32 index);
- ~Mixer();
-
- void setMute(bool mute);
- void setVolume(F32 volume_left, F32 volume_right);
-
-private:
- // use create(index) to create a Mixer
- Mixer(HMIXER handle, U32 mute_control_id, U32 volume_control_id, U32 min_volume, U32 max_volume);
-
- HMIXER mHandle;
- U32 mMuteControlID; // handle to mixer controller for muting
- U32 mVolumeControlID; // handle to mixer controller for changing volume
- U32 mMinVolume; // value that specifies minimum volume as reported by mixer
- U32 mMaxVolume; // value that specifies maximum volume as reported by mixer
-};
-
-// factory function that attempts to create a Mixer object associated with a given mixer line index
-// returns NULL if creation failed
-// static
-Mixer* Mixer::create(U32 index)
-{
- // get handle to mixer object
- HMIXER mixer_handle;
- MMRESULT result = mixerOpen( &mixer_handle,
- index,
- 0, // HWND to call when state changes - not used
- 0, // user data for callback - not used
- MIXER_OBJECTF_MIXER );
-
- if (result == MMSYSERR_NOERROR)
- {
- MIXERLINE mixer_line;
- mixer_line.cbStruct = sizeof( MIXERLINE );
-
- // try speakers first
- mixer_line.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
-
- MMRESULT result = mixerGetLineInfo( reinterpret_cast< HMIXEROBJ >( mixer_handle ),
- &mixer_line,
- MIXER_OBJECTF_HMIXER | MIXER_GETLINEINFOF_COMPONENTTYPE );
- if (result != MMSYSERR_NOERROR)
- { // failed - try headphones next
- mixer_line.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_HEADPHONES;
- result = mixerGetLineInfo( reinterpret_cast< HMIXEROBJ >( mixer_handle ),
- &mixer_line,
- MIXER_OBJECTF_HMIXER | MIXER_GETLINEINFOF_COMPONENTTYPE );
- }
-
- if (result == MMSYSERR_NOERROR)
- { // successfully found mixer line object, now use it to get volume and mute controls
-
- // reuse these objects to query for both volume and mute controls
- MIXERCONTROL mixer_control;
- MIXERLINECONTROLS mixer_line_controls;
- mixer_line_controls.cbStruct = sizeof( MIXERLINECONTROLS );
- mixer_line_controls.dwLineID = mixer_line.dwLineID;
- mixer_line_controls.cControls = 1;
- mixer_line_controls.cbmxctrl = sizeof( MIXERCONTROL );
- mixer_line_controls.pamxctrl = &mixer_control;
-
- // first, query for mute
- mixer_line_controls.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE;
-
- // get control id for mute controls
- result = mixerGetLineControls( reinterpret_cast< HMIXEROBJ >( mixer_handle ),
- &mixer_line_controls,
- MIXER_OBJECTF_HMIXER | MIXER_GETLINECONTROLSF_ONEBYTYPE );
- if (result == MMSYSERR_NOERROR )
- { // we have a mute controls. Remember the mute control id and then query for
- // volume controls using the same struct, but different dwControlType
-
- U32 mute_control_id = mixer_control.dwControlID;
- mixer_line_controls.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
- result = mixerGetLineControls( reinterpret_cast< HMIXEROBJ >( mixer_handle ),
- &mixer_line_controls,
- MIXER_OBJECTF_HMIXER | MIXER_GETLINECONTROLSF_ONEBYTYPE );
-
- if (result == MMSYSERR_NOERROR)
- { // we have both mute and volume controls for this mixer, so we're keeping it
- return new Mixer(mixer_handle,
- mute_control_id,
- mixer_control.dwControlID,
- mixer_control.Bounds.dwMinimum,
- mixer_control.Bounds.dwMaximum);
- }
- }
- }
- }
-
- // if we got here, we didn't successfully create a Mixer object
- mixerClose(mixer_handle);
- return NULL;
-}
-
-Mixer::Mixer(HMIXER handle, U32 mute_control_id, U32 volume_control_id, U32 min_volume, U32 max_volume)
-: mHandle(handle),
- mMuteControlID(mute_control_id),
- mVolumeControlID(volume_control_id),
- mMinVolume(min_volume),
- mMaxVolume(max_volume)
-{}
-
-Mixer::~Mixer()
-{}
-
-// toggle mute for this mixer
-// if mute is set, then volume level will be ignored
-void Mixer::setMute(bool mute)
-{
- MIXERCONTROLDETAILS_BOOLEAN mixer_control_details_bool = { mute };
- MIXERCONTROLDETAILS mixer_control_details;
- mixer_control_details.cbStruct = sizeof( MIXERCONTROLDETAILS );
- mixer_control_details.dwControlID = mMuteControlID;
- mixer_control_details.cChannels = 1;
- mixer_control_details.cMultipleItems = 0;
- mixer_control_details.cbDetails = sizeof( MIXERCONTROLDETAILS_BOOLEAN );
- mixer_control_details.paDetails = &mixer_control_details_bool;
-
- mixerSetControlDetails( reinterpret_cast< HMIXEROBJ >( mHandle ),
- &mixer_control_details,
- MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE );
-}
-
-// set individual volume levels for left and right channels
-// if mute is set, then these values will apply once mute is unset
-void Mixer::setVolume(F32 volume_left, F32 volume_right)
-{
- // assuming pan is in range [-1, 1] set volume levels accordingly
- // if pan == -1 then volume_left_mixer = volume_left && volume_right_mixer = 0
- // if pan == 0 then volume_left_mixer = volume_left && volume_right_mixer = volume_right
- // if pan == 1 then volume_left_mixer = 0 && volume_right_mixer = volume_right
- U32 volume_left_mixer = (U32)
- ((F32)mMinVolume
- + (volume_left * ((F32)mMaxVolume - (F32)mMinVolume)));
- U32 volume_right_mixer = (U32)
- ((F32)mMinVolume
- + (volume_right * ((F32)mMaxVolume - (F32)mMinVolume)));
-
- // pass volume levels on to mixer
- MIXERCONTROLDETAILS_UNSIGNED mixer_control_details_unsigned[ 2 ] = { volume_left_mixer, volume_right_mixer };
- MIXERCONTROLDETAILS mixer_control_details;
- mixer_control_details.cbStruct = sizeof( MIXERCONTROLDETAILS );
- mixer_control_details.dwControlID = mVolumeControlID;
- mixer_control_details.cChannels = 2;
- mixer_control_details.cMultipleItems = 0;
- mixer_control_details.cbDetails = sizeof( MIXERCONTROLDETAILS_UNSIGNED );
- mixer_control_details.paDetails = &mixer_control_details_unsigned;
-
- mixerSetControlDetails( reinterpret_cast< HMIXEROBJ >( mHandle ),
- &mixer_control_details,
- MIXER_OBJECTF_HMIXER | MIXER_SETCONTROLDETAILSF_VALUE );
-}
-
-class VolumeCatcherImpl
+class VolumeCatcherImpl : public LLSingleton<VolumeCatcherImpl>
{
+friend LLSingleton<VolumeCatcherImpl>;
public:
void setVolume(F32 volume);
void setPan(F32 pan);
- static VolumeCatcherImpl *getInstance();
private:
// This is a singleton class -- both callers and the component implementation should use getInstance() to find the instance.
VolumeCatcherImpl();
~VolumeCatcherImpl();
- static VolumeCatcherImpl *sInstance;
-
+ typedef void (*set_volume_func_t)(F32);
+ typedef void (*set_mute_func_t)(bool);
+
+ set_volume_func_t mSetVolumeFunc;
+ set_mute_func_t mSetMuteFunc;
+
F32 mVolume;
F32 mPan;
- typedef std::vector<Mixer*> mixer_vector_t;
- mixer_vector_t mMixers;
};
-VolumeCatcherImpl *VolumeCatcherImpl::sInstance = NULL;
-
-VolumeCatcherImpl *VolumeCatcherImpl::getInstance()
-{
- if(!sInstance)
- {
- sInstance = new VolumeCatcherImpl;
- }
-
- return sInstance;
-}
-
VolumeCatcherImpl::VolumeCatcherImpl()
: mVolume(1.0f), // default volume is max
mPan(0.f) // default pan is centered
{
- OSVERSIONINFOEX V = {sizeof(OSVERSIONINFOEX)}; //EX for NT 5.0 and later
-
- ::GetVersionEx((POSVERSIONINFO)&V);
-
- // disable volume on XP and below
- if (V.dwPlatformId == VER_PLATFORM_WIN32_NT && V.dwMajorVersion >= 6)
+ HMODULE handle = ::LoadLibrary(L"winmm.dll");
+ if(handle)
{
- // for each reported mixer "device", create a proxy object and add to list
- U32 num_mixers = mixerGetNumDevs();
- for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index)
- {
- Mixer* mixerp = Mixer::create(mixer_index);
- if (mixerp)
- {
- mMixers.push_back(mixerp);
- }
- }
+ mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume");
+ mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");
}
}
VolumeCatcherImpl::~VolumeCatcherImpl()
{
- for(mixer_vector_t::iterator it = mMixers.begin(), end_it = mMixers.end();
- it != end_it;
- ++it)
- {
- delete *it;
- *it = NULL;
- }
}
void VolumeCatcherImpl::setVolume(F32 volume)
{
- F32 left_volume = volume * min(1.f, 1.f - mPan);
- F32 right_volume = volume * max(0.f, 1.f + mPan);
+ //F32 left_volume = volume * min(1.f, 1.f - mPan);
+ //F32 right_volume = volume * max(0.f, 1.f + mPan);
- for(mixer_vector_t::iterator it = mMixers.begin(), end_it = mMixers.end();
- it != end_it;
- ++it)
- { // set volume levels and mute for each mixer
- // note that a muted mixer will ignore this volume level
-
- (*it)->setVolume(left_volume, right_volume);
-
- if (volume == 0.f && mVolume != 0.f)
- {
- (*it)->setMute(true);
- }
- else if (mVolume == 0.f && volume != 0.f)
- {
- (*it)->setMute(false);
- }
-
- }
-
mVolume = volume;
+ if (mSetMuteFunc)
+ {
+ mSetMuteFunc(volume == 0.f);
+ }
+ if (mSetVolumeFunc)
+ {
+ mSetVolumeFunc(mVolume);
+ }
}
void VolumeCatcherImpl::setPan(F32 pan)
diff --git a/indra/media_plugins/winmmshim/CMakeLists.txt b/indra/media_plugins/winmmshim/CMakeLists.txt
new file mode 100644
index 0000000000..387214088f
--- /dev/null
+++ b/indra/media_plugins/winmmshim/CMakeLists.txt
@@ -0,0 +1,34 @@
+# -*- cmake -*-
+
+project(winmm_shim)
+
+### winmm_shim
+
+set(winmm_shim_SOURCE_FILES
+ forwarding_api.cpp
+ winmm_shim.cpp
+ )
+
+set(winmm_shim_HEADER_FILES
+ forwarding_api.h
+ winmm.def
+ )
+
+list(APPEND winmm_shim_SOURCE_FILES ${winmm_shim_HEADER_FILES})
+
+set_source_files_properties(${media_plugin_webkit_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+add_library(winmm_shim
+ SHARED
+ ${winmm_shim_SOURCE_FILES}
+)
+
+if (WINDOWS)
+ set_target_properties(
+ winmm_shim
+ PROPERTIES
+ LINK_FLAGS "/MANIFEST:NO"
+ OUTPUT_NAME "winmm"
+ )
+endif (WINDOWS)
diff --git a/indra/media_plugins/winmmshim/forwarding_api.cpp b/indra/media_plugins/winmmshim/forwarding_api.cpp
new file mode 100644
index 0000000000..c2f553dfef
--- /dev/null
+++ b/indra/media_plugins/winmmshim/forwarding_api.cpp
@@ -0,0 +1,1460 @@
+/**
+ * @file forwarding_api.cpp
+ * @brief forwards winmm API calls to real winmm.dll
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "forwarding_api.h"
+
+CloseDriver_type CloseDriver_orig;
+OpenDriver_type OpenDriver_orig;
+SendDriverMessage_type SendDriverMessage_orig;
+DrvGetModuleHandle_type DrvGetModuleHandle_orig;
+GetDriverModuleHandle_type GetDriverModuleHandle_orig;
+DefDriverProc_type DefDriverProc_orig;
+DriverCallback_type DriverCallback_orig;
+mmsystemGetVersion_type mmsystemGetVersion_orig;
+sndPlaySoundA_type sndPlaySoundA_orig;
+sndPlaySoundW_type sndPlaySoundW_orig;
+PlaySoundA_type PlaySoundA_orig;
+PlaySoundW_type PlaySoundW_orig;
+waveOutGetNumDevs_type waveOutGetNumDevs_orig;
+waveOutGetDevCapsA_type waveOutGetDevCapsA_orig;
+waveOutGetDevCapsW_type waveOutGetDevCapsW_orig;
+waveOutGetVolume_type waveOutGetVolume_orig;
+waveOutSetVolume_type waveOutSetVolume_orig;
+waveOutGetErrorTextA_type waveOutGetErrorTextA_orig;
+waveOutGetErrorTextW_type waveOutGetErrorTextW_orig;
+waveOutOpen_type waveOutOpen_orig;
+waveOutClose_type waveOutClose_orig;
+waveOutPrepareHeader_type waveOutPrepareHeader_orig;
+waveOutUnprepareHeader_type waveOutUnprepareHeader_orig;
+waveOutWrite_type waveOutWrite_orig;
+waveOutPause_type waveOutPause_orig;
+waveOutRestart_type waveOutRestart_orig;
+waveOutReset_type waveOutReset_orig;
+waveOutBreakLoop_type waveOutBreakLoop_orig;
+waveOutGetPosition_type waveOutGetPosition_orig;
+waveOutGetPitch_type waveOutGetPitch_orig;
+waveOutSetPitch_type waveOutSetPitch_orig;
+waveOutGetPlaybackRate_type waveOutGetPlaybackRate_orig;
+waveOutSetPlaybackRate_type waveOutSetPlaybackRate_orig;
+waveOutGetID_type waveOutGetID_orig;
+waveOutMessage_type waveOutMessage_orig;
+waveInGetNumDevs_type waveInGetNumDevs_orig;
+waveInGetDevCapsA_type waveInGetDevCapsA_orig;
+waveInGetDevCapsW_type waveInGetDevCapsW_orig;
+waveInGetErrorTextA_type waveInGetErrorTextA_orig;
+waveInGetErrorTextW_type waveInGetErrorTextW_orig;
+waveInOpen_type waveInOpen_orig;
+waveInClose_type waveInClose_orig;
+waveInPrepareHeader_type waveInPrepareHeader_orig;
+waveInUnprepareHeader_type waveInUnprepareHeader_orig;
+waveInAddBuffer_type waveInAddBuffer_orig;
+waveInStart_type waveInStart_orig;
+waveInStop_type waveInStop_orig;
+waveInReset_type waveInReset_orig;
+waveInGetPosition_type waveInGetPosition_orig;
+waveInGetID_type waveInGetID_orig;
+waveInMessage_type waveInMessage_orig;
+midiOutGetNumDevs_type midiOutGetNumDevs_orig;
+midiStreamOpen_type midiStreamOpen_orig;
+midiStreamClose_type midiStreamClose_orig;
+midiStreamProperty_type midiStreamProperty_orig;
+midiStreamPosition_type midiStreamPosition_orig;
+midiStreamOut_type midiStreamOut_orig;
+midiStreamPause_type midiStreamPause_orig;
+midiStreamRestart_type midiStreamRestart_orig;
+midiStreamStop_type midiStreamStop_orig;
+midiConnect_type midiConnect_orig;
+midiDisconnect_type midiDisconnect_orig;
+midiOutGetDevCapsA_type midiOutGetDevCapsA_orig;
+midiOutGetDevCapsW_type midiOutGetDevCapsW_orig;
+midiOutGetVolume_type midiOutGetVolume_orig;
+midiOutSetVolume_type midiOutSetVolume_orig;
+midiOutGetErrorTextA_type midiOutGetErrorTextA_orig;
+midiOutGetErrorTextW_type midiOutGetErrorTextW_orig;
+midiOutOpen_type midiOutOpen_orig;
+midiOutClose_type midiOutClose_orig;
+midiOutPrepareHeader_type midiOutPrepareHeader_orig;
+midiOutUnprepareHeader_type midiOutUnprepareHeader_orig;
+midiOutShortMsg_type midiOutShortMsg_orig;
+midiOutLongMsg_type midiOutLongMsg_orig;
+midiOutReset_type midiOutReset_orig;
+midiOutCachePatches_type midiOutCachePatches_orig;
+midiOutCacheDrumPatches_type midiOutCacheDrumPatches_orig;
+midiOutGetID_type midiOutGetID_orig;
+midiOutMessage_type midiOutMessage_orig;
+midiInGetNumDevs_type midiInGetNumDevs_orig;
+midiInGetDevCapsA_type midiInGetDevCapsA_orig;
+midiInGetDevCapsW_type midiInGetDevCapsW_orig;
+midiInGetErrorTextA_type midiInGetErrorTextA_orig;
+midiInGetErrorTextW_type midiInGetErrorTextW_orig;
+midiInOpen_type midiInOpen_orig;
+midiInClose_type midiInClose_orig;
+midiInPrepareHeader_type midiInPrepareHeader_orig;
+midiInUnprepareHeader_type midiInUnprepareHeader_orig;
+midiInAddBuffer_type midiInAddBuffer_orig;
+midiInStart_type midiInStart_orig;
+midiInStop_type midiInStop_orig;
+midiInReset_type midiInReset_orig;
+midiInGetID_type midiInGetID_orig;
+midiInMessage_type midiInMessage_orig;
+auxGetNumDevs_type auxGetNumDevs_orig;
+auxGetDevCapsA_type auxGetDevCapsA_orig;
+auxGetDevCapsW_type auxGetDevCapsW_orig;
+auxSetVolume_type auxSetVolume_orig;
+auxGetVolume_type auxGetVolume_orig;
+auxOutMessage_type auxOutMessage_orig;
+mixerGetNumDevs_type mixerGetNumDevs_orig;
+mixerGetDevCapsA_type mixerGetDevCapsA_orig;
+mixerGetDevCapsW_type mixerGetDevCapsW_orig;
+mixerOpen_type mixerOpen_orig;
+mixerClose_type mixerClose_orig;
+mixerMessage_type mixerMessage_orig;
+mixerGetLineInfoA_type mixerGetLineInfoA_orig;
+mixerGetLineInfoW_type mixerGetLineInfoW_orig;
+mixerGetID_type mixerGetID_orig;
+mixerGetLineControlsA_type mixerGetLineControlsA_orig;
+mixerGetLineControlsW_type mixerGetLineControlsW_orig;
+mixerGetControlDetailsA_type mixerGetControlDetailsA_orig;
+mixerGetControlDetailsW_type mixerGetControlDetailsW_orig;
+mixerSetControlDetails_type mixerSetControlDetails_orig;
+mmGetCurrentTask_type mmGetCurrentTask_orig;
+mmTaskBlock_type mmTaskBlock_orig;
+mmTaskCreate_type mmTaskCreate_orig;
+mmTaskSignal_type mmTaskSignal_orig;
+mmTaskYield_type mmTaskYield_orig;
+timeGetSystemTime_type timeGetSystemTime_orig;
+timeGetTime_type timeGetTime_orig;
+timeSetEvent_type timeSetEvent_orig;
+timeKillEvent_type timeKillEvent_orig;
+timeGetDevCaps_type timeGetDevCaps_orig;
+timeBeginPeriod_type timeBeginPeriod_orig;
+timeEndPeriod_type timeEndPeriod_orig;
+joyGetNumDevs_type joyGetNumDevs_orig;
+joyConfigChanged_type joyConfigChanged_orig;
+joyGetDevCapsA_type joyGetDevCapsA_orig;
+joyGetDevCapsW_type joyGetDevCapsW_orig;
+joyGetPos_type joyGetPos_orig;
+joyGetPosEx_type joyGetPosEx_orig;
+joyGetThreshold_type joyGetThreshold_orig;
+joyReleaseCapture_type joyReleaseCapture_orig;
+joySetCapture_type joySetCapture_orig;
+joySetThreshold_type joySetThreshold_orig;
+mmioStringToFOURCCA_type mmioStringToFOURCCA_orig;
+mmioStringToFOURCCW_type mmioStringToFOURCCW_orig;
+mmioInstallIOProcA_type mmioInstallIOProcA_orig;
+mmioInstallIOProcW_type mmioInstallIOProcW_orig;
+mmioOpenA_type mmioOpenA_orig;
+mmioOpenW_type mmioOpenW_orig;
+mmioRenameA_type mmioRenameA_orig;
+mmioRenameW_type mmioRenameW_orig;
+mmioClose_type mmioClose_orig;
+mmioRead_type mmioRead_orig;
+mmioWrite_type mmioWrite_orig;
+mmioSeek_type mmioSeek_orig;
+mmioGetInfo_type mmioGetInfo_orig;
+mmioSetInfo_type mmioSetInfo_orig;
+mmioSetBuffer_type mmioSetBuffer_orig;
+mmioFlush_type mmioFlush_orig;
+mmioAdvance_type mmioAdvance_orig;
+mmioSendMessage_type mmioSendMessage_orig;
+mmioDescend_type mmioDescend_orig;
+mmioAscend_type mmioAscend_orig;
+mmioCreateChunk_type mmioCreateChunk_orig;
+mciSendCommandA_type mciSendCommandA_orig;
+mciSendCommandW_type mciSendCommandW_orig;
+mciSendStringA_type mciSendStringA_orig;
+mciSendStringW_type mciSendStringW_orig;
+mciGetDeviceIDA_type mciGetDeviceIDA_orig;
+mciGetDeviceIDW_type mciGetDeviceIDW_orig;
+mciGetDeviceIDFromElementIDA_type mciGetDeviceIDFromElementIDA_orig;
+mciGetDeviceIDFromElementIDW_type mciGetDeviceIDFromElementIDW_orig;
+mciGetDriverData_type mciGetDriverData_orig;
+mciGetErrorStringA_type mciGetErrorStringA_orig;
+mciGetErrorStringW_type mciGetErrorStringW_orig;
+mciSetDriverData_type mciSetDriverData_orig;
+mciDriverNotify_type mciDriverNotify_orig;
+mciDriverYield_type mciDriverYield_orig;
+mciSetYieldProc_type mciSetYieldProc_orig;
+mciFreeCommandResource_type mciFreeCommandResource_orig;
+mciGetCreatorTask_type mciGetCreatorTask_orig;
+mciGetYieldProc_type mciGetYieldProc_orig;
+mciLoadCommandResource_type mciLoadCommandResource_orig;
+mciExecute_type mciExecute_orig;
+
+// grab pointers to function calls in the real DLL
+void init_function_pointers(HMODULE winmm_handle)
+{
+ CloseDriver_orig = (CloseDriver_type)::GetProcAddress(winmm_handle, "CloseDriver");
+ OpenDriver_orig = (OpenDriver_type)::GetProcAddress(winmm_handle, "OpenDriver");
+ SendDriverMessage_orig = (SendDriverMessage_type)::GetProcAddress(winmm_handle, "SendDriverMessage");
+ DrvGetModuleHandle_orig = (DrvGetModuleHandle_type)::GetProcAddress(winmm_handle, "DrvGetModuleHandle");
+ GetDriverModuleHandle_orig = (GetDriverModuleHandle_type)::GetProcAddress(winmm_handle, "GetDriverModuleHandle");
+ DefDriverProc_orig = (DefDriverProc_type)::GetProcAddress(winmm_handle, "DefDriverProc");
+ DriverCallback_orig = (DriverCallback_type)::GetProcAddress(winmm_handle, "DriverCallback");
+ mmsystemGetVersion_orig = (mmsystemGetVersion_type)::GetProcAddress(winmm_handle, "mmsystemGetVersion");
+ sndPlaySoundA_orig = (sndPlaySoundA_type)::GetProcAddress(winmm_handle, "sndPlaySoundA");
+ sndPlaySoundW_orig = (sndPlaySoundW_type)::GetProcAddress(winmm_handle, "sndPlaySoundW");
+ PlaySoundA_orig = (PlaySoundA_type)::GetProcAddress(winmm_handle, "PlaySoundA");
+ PlaySoundW_orig = (PlaySoundW_type)::GetProcAddress(winmm_handle, "PlaySoundW");
+ waveOutGetNumDevs_orig = (waveOutGetNumDevs_type)::GetProcAddress(winmm_handle, "waveOutGetNumDevs");
+ waveOutGetDevCapsA_orig = (waveOutGetDevCapsA_type)::GetProcAddress(winmm_handle, "waveOutGetDevCapsA");
+ waveOutGetDevCapsW_orig = (waveOutGetDevCapsW_type)::GetProcAddress(winmm_handle, "waveOutGetDevCapsW");
+ waveOutGetVolume_orig = (waveOutGetVolume_type)::GetProcAddress(winmm_handle, "waveOutGetVolume");
+ waveOutSetVolume_orig = (waveOutSetVolume_type)::GetProcAddress(winmm_handle, "waveOutSetVolume");
+ waveOutGetErrorTextA_orig = (waveOutGetErrorTextA_type)::GetProcAddress(winmm_handle, "waveOutGetErrorTextA");
+ waveOutGetErrorTextW_orig = (waveOutGetErrorTextW_type)::GetProcAddress(winmm_handle, "waveOutGetErrorTextW");
+ waveOutOpen_orig = (waveOutOpen_type)::GetProcAddress(winmm_handle, "waveOutOpen");
+ waveOutClose_orig = (waveOutClose_type)::GetProcAddress(winmm_handle, "waveOutClose");
+ waveOutPrepareHeader_orig = (waveOutPrepareHeader_type)::GetProcAddress(winmm_handle, "waveOutPrepareHeader");
+ waveOutUnprepareHeader_orig = (waveOutUnprepareHeader_type)::GetProcAddress(winmm_handle, "waveOutUnprepareHeader");
+ waveOutWrite_orig = (waveOutWrite_type)::GetProcAddress(winmm_handle, "waveOutWrite");
+ waveOutPause_orig = (waveOutPause_type)::GetProcAddress(winmm_handle, "waveOutPause");
+ waveOutRestart_orig = (waveOutRestart_type)::GetProcAddress(winmm_handle, "waveOutRestart");
+ waveOutReset_orig = (waveOutReset_type)::GetProcAddress(winmm_handle, "waveOutReset");
+ waveOutBreakLoop_orig = (waveOutBreakLoop_type)::GetProcAddress(winmm_handle, "waveOutBreakLoop");
+ waveOutGetPosition_orig = (waveOutGetPosition_type)::GetProcAddress(winmm_handle, "waveOutGetPosition");
+ waveOutGetPitch_orig = (waveOutGetPitch_type)::GetProcAddress(winmm_handle, "waveOutGetPitch");
+ waveOutSetPitch_orig = (waveOutSetPitch_type)::GetProcAddress(winmm_handle, "waveOutSetPitch");
+ waveOutGetPlaybackRate_orig = (waveOutGetPlaybackRate_type)::GetProcAddress(winmm_handle, "waveOutGetPlaybackRate");
+ waveOutSetPlaybackRate_orig = (waveOutSetPlaybackRate_type)::GetProcAddress(winmm_handle, "waveOutSetPlaybackRate");
+ waveOutGetID_orig = (waveOutGetID_type)::GetProcAddress(winmm_handle, "waveOutGetID");
+ waveOutMessage_orig = (waveOutMessage_type)::GetProcAddress(winmm_handle, "waveOutMessage");
+ waveInGetNumDevs_orig = (waveInGetNumDevs_type)::GetProcAddress(winmm_handle, "waveInGetNumDevs");
+ waveInGetDevCapsA_orig = (waveInGetDevCapsA_type)::GetProcAddress(winmm_handle, "waveInGetDevCapsA");
+ waveInGetDevCapsW_orig = (waveInGetDevCapsW_type)::GetProcAddress(winmm_handle, "waveInGetDevCapsW");
+ waveInGetErrorTextA_orig = (waveInGetErrorTextA_type)::GetProcAddress(winmm_handle, "waveInGetErrorTextA");
+ waveInGetErrorTextW_orig = (waveInGetErrorTextW_type)::GetProcAddress(winmm_handle, "waveInGetErrorTextW");
+ waveInOpen_orig = (waveInOpen_type)::GetProcAddress(winmm_handle, "waveInOpen");
+ waveInClose_orig = (waveInClose_type)::GetProcAddress(winmm_handle, "waveInClose");
+ waveInPrepareHeader_orig = (waveInPrepareHeader_type)::GetProcAddress(winmm_handle, "waveInPrepareHeader");
+ waveInUnprepareHeader_orig = (waveInUnprepareHeader_type)::GetProcAddress(winmm_handle, "waveInUnprepareHeader");
+ waveInAddBuffer_orig = (waveInAddBuffer_type)::GetProcAddress(winmm_handle, "waveInAddBuffer");
+ waveInStart_orig = (waveInStart_type)::GetProcAddress(winmm_handle, "waveInStart");
+ waveInStop_orig = (waveInStop_type)::GetProcAddress(winmm_handle, "waveInStop");
+ waveInReset_orig = (waveInReset_type)::GetProcAddress(winmm_handle, "waveInReset");
+ waveInGetPosition_orig = (waveInGetPosition_type)::GetProcAddress(winmm_handle, "waveInGetPosition");
+ waveInGetID_orig = (waveInGetID_type)::GetProcAddress(winmm_handle, "waveInGetID");
+ waveInMessage_orig = (waveInMessage_type)::GetProcAddress(winmm_handle, "waveInMessage");
+ midiOutGetNumDevs_orig = (midiOutGetNumDevs_type)::GetProcAddress(winmm_handle, "midiOutGetNumDevs");
+ midiStreamOpen_orig = (midiStreamOpen_type)::GetProcAddress(winmm_handle, "midiStreamOpen");
+ midiStreamClose_orig = (midiStreamClose_type)::GetProcAddress(winmm_handle, "midiStreamClose");
+ midiStreamProperty_orig = (midiStreamProperty_type)::GetProcAddress(winmm_handle, "midiStreamProperty");
+ midiStreamPosition_orig = (midiStreamPosition_type)::GetProcAddress(winmm_handle, "midiStreamPosition");
+ midiStreamOut_orig = (midiStreamOut_type)::GetProcAddress(winmm_handle, "midiStreamOut");
+ midiStreamPause_orig = (midiStreamPause_type)::GetProcAddress(winmm_handle, "midiStreamPause");
+ midiStreamRestart_orig = (midiStreamRestart_type)::GetProcAddress(winmm_handle, "midiStreamRestart");
+ midiStreamStop_orig = (midiStreamStop_type)::GetProcAddress(winmm_handle, "midiStreamStop");
+ midiConnect_orig = (midiConnect_type)::GetProcAddress(winmm_handle, "midiConnect");
+ midiDisconnect_orig = (midiDisconnect_type)::GetProcAddress(winmm_handle, "midiDisconnect");
+ midiOutGetDevCapsA_orig = (midiOutGetDevCapsA_type)::GetProcAddress(winmm_handle, "midiOutGetDevCapsA");
+ midiOutGetDevCapsW_orig = (midiOutGetDevCapsW_type)::GetProcAddress(winmm_handle, "midiOutGetDevCapsW");
+ midiOutGetVolume_orig = (midiOutGetVolume_type)::GetProcAddress(winmm_handle, "midiOutGetVolume");
+ midiOutSetVolume_orig = (midiOutSetVolume_type)::GetProcAddress(winmm_handle, "midiOutSetVolume");
+ midiOutGetErrorTextA_orig = (midiOutGetErrorTextA_type)::GetProcAddress(winmm_handle, "midiOutGetErrorTextA");
+ midiOutGetErrorTextW_orig = (midiOutGetErrorTextW_type)::GetProcAddress(winmm_handle, "midiOutGetErrorTextW");
+ midiOutOpen_orig = (midiOutOpen_type)::GetProcAddress(winmm_handle, "midiOutOpen");
+ midiOutClose_orig = (midiOutClose_type)::GetProcAddress(winmm_handle, "midiOutClose");
+ midiOutPrepareHeader_orig = (midiOutPrepareHeader_type)::GetProcAddress(winmm_handle, "midiOutPrepareHeader");
+ midiOutUnprepareHeader_orig = (midiOutUnprepareHeader_type)::GetProcAddress(winmm_handle, "midiOutUnprepareHeader");
+ midiOutShortMsg_orig = (midiOutShortMsg_type)::GetProcAddress(winmm_handle, "midiOutShortMsg");
+ midiOutLongMsg_orig = (midiOutLongMsg_type)::GetProcAddress(winmm_handle, "midiOutLongMsg");
+ midiOutReset_orig = (midiOutReset_type)::GetProcAddress(winmm_handle, "midiOutReset");
+ midiOutCachePatches_orig = (midiOutCachePatches_type)::GetProcAddress(winmm_handle, "midiOutCachePatches");
+ midiOutCacheDrumPatches_orig = (midiOutCacheDrumPatches_type)::GetProcAddress(winmm_handle, "midiOutCacheDrumPatches");
+ midiOutGetID_orig = (midiOutGetID_type)::GetProcAddress(winmm_handle, "midiOutGetID");
+ midiOutMessage_orig = (midiOutMessage_type)::GetProcAddress(winmm_handle, "midiOutMessage");
+ midiInGetNumDevs_orig = (midiInGetNumDevs_type)::GetProcAddress(winmm_handle, "midiInGetNumDevs");
+ midiInGetDevCapsA_orig = (midiInGetDevCapsA_type)::GetProcAddress(winmm_handle, "midiInGetDevCapsA");
+ midiInGetDevCapsW_orig = (midiInGetDevCapsW_type)::GetProcAddress(winmm_handle, "midiInGetDevCapsW");
+ midiInGetErrorTextA_orig = (midiInGetErrorTextA_type)::GetProcAddress(winmm_handle, "midiInGetErrorTextA");
+ midiInGetErrorTextW_orig = (midiInGetErrorTextW_type)::GetProcAddress(winmm_handle, "midiInGetErrorTextW");
+ midiInOpen_orig = (midiInOpen_type)::GetProcAddress(winmm_handle, "midiInOpen");
+ midiInClose_orig = (midiInClose_type)::GetProcAddress(winmm_handle, "midiInClose");
+ midiInPrepareHeader_orig = (midiInPrepareHeader_type)::GetProcAddress(winmm_handle, "midiInPrepareHeader");
+ midiInUnprepareHeader_orig = (midiInUnprepareHeader_type)::GetProcAddress(winmm_handle, "midiInUnprepareHeader");
+ midiInAddBuffer_orig = (midiInAddBuffer_type)::GetProcAddress(winmm_handle, "midiInAddBuffer");
+ midiInStart_orig = (midiInStart_type)::GetProcAddress(winmm_handle, "midiInStart");
+ midiInStop_orig = (midiInStop_type)::GetProcAddress(winmm_handle, "midiInStop");
+ midiInReset_orig = (midiInReset_type)::GetProcAddress(winmm_handle, "midiInReset");
+ midiInGetID_orig = (midiInGetID_type)::GetProcAddress(winmm_handle, "midiInGetID");
+ midiInMessage_orig = (midiInMessage_type)::GetProcAddress(winmm_handle, "midiInMessage");
+ auxGetNumDevs_orig = (auxGetNumDevs_type)::GetProcAddress(winmm_handle, "auxGetNumDevs");
+ auxGetDevCapsA_orig = (auxGetDevCapsA_type)::GetProcAddress(winmm_handle, "auxGetDevCapsA");
+ auxGetDevCapsW_orig = (auxGetDevCapsW_type)::GetProcAddress(winmm_handle, "auxGetDevCapsW");
+ auxSetVolume_orig = (auxSetVolume_type)::GetProcAddress(winmm_handle, "auxSetVolume");
+ auxGetVolume_orig = (auxGetVolume_type)::GetProcAddress(winmm_handle, "auxGetVolume");
+ auxOutMessage_orig = (auxOutMessage_type)::GetProcAddress(winmm_handle, "auxOutMessage");
+ mixerGetNumDevs_orig = (mixerGetNumDevs_type)::GetProcAddress(winmm_handle, "mixerGetNumDevs");
+ mixerGetDevCapsA_orig = (mixerGetDevCapsA_type)::GetProcAddress(winmm_handle, "mixerGetDevCapsA");
+ mixerGetDevCapsW_orig = (mixerGetDevCapsW_type)::GetProcAddress(winmm_handle, "mixerGetDevCapsW");
+ mixerOpen_orig = (mixerOpen_type)::GetProcAddress(winmm_handle, "mixerOpen");
+ mixerClose_orig = (mixerClose_type)::GetProcAddress(winmm_handle, "mixerClose");
+ mixerMessage_orig = (mixerMessage_type)::GetProcAddress(winmm_handle, "mixerMessage");
+ mixerGetLineInfoA_orig = (mixerGetLineInfoA_type)::GetProcAddress(winmm_handle, "mixerGetLineInfoA");
+ mixerGetLineInfoW_orig = (mixerGetLineInfoW_type)::GetProcAddress(winmm_handle, "mixerGetLineInfoW");
+ mixerGetID_orig = (mixerGetID_type)::GetProcAddress(winmm_handle, "mixerGetID");
+ mixerGetLineControlsA_orig = (mixerGetLineControlsA_type)::GetProcAddress(winmm_handle, "mixerGetLineControlsA");
+ mixerGetLineControlsW_orig = (mixerGetLineControlsW_type)::GetProcAddress(winmm_handle, "mixerGetLineControlsW");
+ mixerGetControlDetailsA_orig = (mixerGetControlDetailsA_type)::GetProcAddress(winmm_handle, "mixerGetControlDetailsA");
+ mixerGetControlDetailsW_orig = (mixerGetControlDetailsW_type)::GetProcAddress(winmm_handle, "mixerGetControlDetailsW");
+ mixerSetControlDetails_orig = (mixerSetControlDetails_type)::GetProcAddress(winmm_handle, "mixerSetControlDetails");
+ mmGetCurrentTask_orig = (mmGetCurrentTask_type)::GetProcAddress(winmm_handle, "mmGetCurrentTask");
+ mmTaskBlock_orig = (mmTaskBlock_type)::GetProcAddress(winmm_handle, "mmTaskBlock");
+ mmTaskCreate_orig = (mmTaskCreate_type)::GetProcAddress(winmm_handle, "mmTaskCreate");
+ mmTaskSignal_orig = (mmTaskSignal_type)::GetProcAddress(winmm_handle, "mmTaskSignal");
+ mmTaskYield_orig = (mmTaskYield_type)::GetProcAddress(winmm_handle, "mmTaskYield");
+ timeGetSystemTime_orig = (timeGetSystemTime_type)::GetProcAddress(winmm_handle, "timeGetSystemTime");
+ timeGetTime_orig = (timeGetTime_type)::GetProcAddress(winmm_handle, "timeGetTime");
+ timeSetEvent_orig = (timeSetEvent_type)::GetProcAddress(winmm_handle, "timeSetEvent");
+ timeKillEvent_orig = (timeKillEvent_type)::GetProcAddress(winmm_handle, "timeKillEvent");
+ timeGetDevCaps_orig = (timeGetDevCaps_type)::GetProcAddress(winmm_handle, "timeGetDevCaps");
+ timeBeginPeriod_orig = (timeBeginPeriod_type)::GetProcAddress(winmm_handle, "timeBeginPeriod");
+ timeEndPeriod_orig = (timeEndPeriod_type)::GetProcAddress(winmm_handle, "timeEndPeriod");
+ joyGetNumDevs_orig = (joyGetNumDevs_type)::GetProcAddress(winmm_handle, "joyGetNumDevs");
+ joyConfigChanged_orig = (joyConfigChanged_type)::GetProcAddress(winmm_handle, "joyConfigChanged");
+ joyGetDevCapsA_orig = (joyGetDevCapsA_type)::GetProcAddress(winmm_handle, "joyGetDevCapsA");
+ joyGetDevCapsW_orig = (joyGetDevCapsW_type)::GetProcAddress(winmm_handle, "joyGetDevCapsW");
+ joyGetPos_orig = (joyGetPos_type)::GetProcAddress(winmm_handle, "joyGetPos");
+ joyGetPosEx_orig = (joyGetPosEx_type)::GetProcAddress(winmm_handle, "joyGetPosEx");
+ joyGetThreshold_orig = (joyGetThreshold_type)::GetProcAddress(winmm_handle, "joyGetThreshold");
+ joyReleaseCapture_orig = (joyReleaseCapture_type)::GetProcAddress(winmm_handle, "joyReleaseCapture");
+ joySetCapture_orig = (joySetCapture_type)::GetProcAddress(winmm_handle, "joySetCapture");
+ joySetThreshold_orig = (joySetThreshold_type)::GetProcAddress(winmm_handle, "joySetThreshold");
+ mciDriverNotify_orig = (mciDriverNotify_type)::GetProcAddress(winmm_handle, "mciDriverNotify");
+ mciDriverYield_orig = (mciDriverYield_type)::GetProcAddress(winmm_handle, "mciDriverYield");
+ mmioStringToFOURCCA_orig = (mmioStringToFOURCCA_type)::GetProcAddress(winmm_handle, "mmioStringToFOURCCA");
+ mmioStringToFOURCCW_orig = (mmioStringToFOURCCW_type)::GetProcAddress(winmm_handle, "mmioStringToFOURCCW");
+ mmioInstallIOProcA_orig = (mmioInstallIOProcA_type)::GetProcAddress(winmm_handle, "mmioInstallIOProcA");
+ mmioInstallIOProcW_orig = (mmioInstallIOProcW_type)::GetProcAddress(winmm_handle, "mmioInstallIOProcW");
+ mmioOpenA_orig = (mmioOpenA_type)::GetProcAddress(winmm_handle, "mmioOpenA");
+ mmioOpenW_orig = (mmioOpenW_type)::GetProcAddress(winmm_handle, "mmioOpenW");
+ mmioRenameA_orig = (mmioRenameA_type)::GetProcAddress(winmm_handle, "mmioRenameA");
+ mmioRenameW_orig = (mmioRenameW_type)::GetProcAddress(winmm_handle, "mmioRenameW");
+ mmioClose_orig = (mmioClose_type)::GetProcAddress(winmm_handle, "mmioClose");
+ mmioRead_orig = (mmioRead_type)::GetProcAddress(winmm_handle, "mmioRead");
+ mmioWrite_orig = (mmioWrite_type)::GetProcAddress(winmm_handle, "mmioWrite");
+ mmioSeek_orig = (mmioSeek_type)::GetProcAddress(winmm_handle, "mmioSeek");
+ mmioGetInfo_orig = (mmioGetInfo_type)::GetProcAddress(winmm_handle, "mmioGetInfo");
+ mmioSetInfo_orig = (mmioSetInfo_type)::GetProcAddress(winmm_handle, "mmioSetInfo");
+ mmioSetBuffer_orig = (mmioSetBuffer_type)::GetProcAddress(winmm_handle, "mmioSetBuffer");
+ mmioFlush_orig = (mmioFlush_type)::GetProcAddress(winmm_handle, "mmioFlush");
+ mmioAdvance_orig = (mmioAdvance_type)::GetProcAddress(winmm_handle, "mmioAdvance");
+ mmioSendMessage_orig = (mmioSendMessage_type)::GetProcAddress(winmm_handle, "mmioSendMessage");
+ mmioDescend_orig = (mmioDescend_type)::GetProcAddress(winmm_handle, "mmioDescend");
+ mmioAscend_orig = (mmioAscend_type)::GetProcAddress(winmm_handle, "mmioAscend");
+ mmioCreateChunk_orig = (mmioCreateChunk_type)::GetProcAddress(winmm_handle, "mmioCreateChunk");
+ mciSendCommandA_orig = (mciSendCommandA_type)::GetProcAddress(winmm_handle, "mciSendCommandA");
+ mciSendCommandW_orig = (mciSendCommandW_type)::GetProcAddress(winmm_handle, "mciSendCommandW");
+ mciSendStringA_orig = (mciSendStringA_type)::GetProcAddress(winmm_handle, "mciSendStringA");
+ mciSendStringW_orig = (mciSendStringW_type)::GetProcAddress(winmm_handle, "mciSendStringW");
+ mciGetDeviceIDA_orig = (mciGetDeviceIDA_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDA");
+ mciGetDeviceIDW_orig = (mciGetDeviceIDW_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDW");
+ mciGetDeviceIDFromElementIDA_orig = (mciGetDeviceIDFromElementIDA_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDFromElementIDA");
+ mciGetDeviceIDFromElementIDW_orig = (mciGetDeviceIDFromElementIDW_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDFromElementIDW");
+ mciGetDriverData_orig = (mciGetDriverData_type)::GetProcAddress(winmm_handle, "mciGetDriverData");
+ mciGetErrorStringA_orig = (mciGetErrorStringA_type)::GetProcAddress(winmm_handle, "mciGetErrorStringA");
+ mciGetErrorStringW_orig = (mciGetErrorStringW_type)::GetProcAddress(winmm_handle, "mciGetErrorStringW");
+ mciSetDriverData_orig = (mciSetDriverData_type)::GetProcAddress(winmm_handle, "mciSetDriverData");
+ mciSetYieldProc_orig = (mciSetYieldProc_type)::GetProcAddress(winmm_handle, "mciSetYieldProc");
+ mciFreeCommandResource_orig = (mciFreeCommandResource_type)::GetProcAddress(winmm_handle, "mciFreeCommandResource");
+ mciGetCreatorTask_orig = (mciGetCreatorTask_type)::GetProcAddress(winmm_handle, "mciGetCreatorTask");
+ mciGetYieldProc_orig = (mciGetYieldProc_type)::GetProcAddress(winmm_handle, "mciGetYieldProc");
+ mciLoadCommandResource_orig = (mciLoadCommandResource_type)::GetProcAddress(winmm_handle, "mciLoadCommandResource");
+ mciExecute_orig = (mciExecute_type)::GetProcAddress(winmm_handle, "mciExecute");
+}
+
+extern "C" {
+ LRESULT WINAPI CloseDriver( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2)
+ {
+ //OutputDebugString(L"CloseDriver\n");
+ return CloseDriver_orig( hDriver, lParam1, lParam2);
+ }
+
+ HDRVR WINAPI OpenDriver( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2)
+ {
+ //OutputDebugString(L"OpenDriver\n");
+ return OpenDriver_orig( szDriverName, szSectionName, lParam2);
+ }
+
+ LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2)
+ {
+ //OutputDebugString(L"SendDriverMessage\n");
+ return SendDriverMessage_orig( hDriver, message, lParam1, lParam2);
+ }
+
+ HMODULE WINAPI DrvGetModuleHandle( HDRVR hDriver)
+ {
+ //OutputDebugString(L"DrvGetModuleHandle\n");
+ return DrvGetModuleHandle_orig( hDriver);
+ }
+
+ HMODULE WINAPI GetDriverModuleHandle( HDRVR hDriver)
+ {
+ //OutputDebugString(L"GetDriverModuleHandle\n");
+ return GetDriverModuleHandle_orig( hDriver);
+ }
+
+ LRESULT WINAPI DefDriverProc( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
+ {
+ //OutputDebugString(L"DefDriverProc\n");
+ return DefDriverProc_orig( dwDriverIdentifier, hdrvr, uMsg, lParam1, lParam2);
+ }
+
+ BOOL WINAPI DriverCallback( DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
+ {
+ //OutputDebugString(L"DriverCallback\n");
+ return DriverCallback_orig(dwCallBack, dwFlags, hdrvr, msg, dwUser, dwParam1, dwParam2);
+ }
+
+ UINT WINAPI mmsystemGetVersion(void)
+ {
+ //OutputDebugString(L"mmsystemGetVersion\n");
+ return mmsystemGetVersion_orig();
+ }
+
+ BOOL WINAPI sndPlaySoundA( LPCSTR pszSound, UINT fuSound)
+ {
+ //OutputDebugString(L"sndPlaySoundA\n");
+ return sndPlaySoundA_orig( pszSound, fuSound);
+ }
+
+ BOOL WINAPI sndPlaySoundW( LPCWSTR pszSound, UINT fuSound)
+ {
+ //OutputDebugString(L"sndPlaySoundW\n");
+ return sndPlaySoundW_orig( pszSound, fuSound);
+ }
+
+ BOOL WINAPI PlaySoundA( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound)
+ {
+ //OutputDebugString(L"PlaySoundA\n");
+ return PlaySoundA_orig( pszSound, hmod, fdwSound);
+ }
+
+ BOOL WINAPI PlaySoundW( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound)
+ {
+ //OutputDebugString(L"PlaySoundW\n");
+ return PlaySoundW_orig( pszSound, hmod, fdwSound);
+ }
+
+ UINT WINAPI waveOutGetNumDevs(void)
+ {
+ //OutputDebugString(L"waveOutGetNumDevs\n");
+ return waveOutGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI waveOutGetDevCapsA( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc)
+ {
+ //OutputDebugString(L"waveOutGetDevCapsA\n");
+ return waveOutGetDevCapsA_orig( uDeviceID, pwoc, cbwoc);
+ }
+
+ MMRESULT WINAPI waveOutGetDevCapsW( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc)
+ {
+ //OutputDebugString(L"waveOutGetDevCapsW\n");
+ return waveOutGetDevCapsW_orig( uDeviceID, pwoc, cbwoc);
+ }
+
+
+ MMRESULT WINAPI waveOutGetVolume( HWAVEOUT hwo, LPDWORD pdwVolume)
+ {
+ //OutputDebugString(L"waveOutGetVolume\n");
+ return waveOutGetVolume_orig( hwo, pdwVolume);
+ }
+
+ MMRESULT WINAPI waveOutSetVolume( HWAVEOUT hwo, DWORD dwVolume)
+ {
+ //OutputDebugString(L"waveOutSetVolume\n");
+ return waveOutSetVolume_orig( hwo, dwVolume);
+ }
+
+ MMRESULT WINAPI waveOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"waveOutGetErrorTextA\n");
+ return waveOutGetErrorTextA_orig( mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI waveOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"waveOutGetErrorTextW\n");
+ return waveOutGetErrorTextW_orig( mmrError, pszText, cchText);
+ }
+
+ //MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ //{
+ // //OutputDebugString(L"waveOutGetErrorTextW\n");
+ // return waveOutOpen_orig( phwo, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen);
+ //}
+
+ //MMRESULT WINAPI waveOutClose( HWAVEOUT hwo)
+ //{
+ // //OutputDebugString(L"waveOutGetErrorTextW\n");
+ // return waveOutClose_orig( hwo );
+ //}
+
+ MMRESULT WINAPI waveOutPrepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
+ {
+ //OutputDebugString(L"waveOutPrepareHeader\n");
+ return waveOutPrepareHeader_orig( hwo, pwh, cbwh);
+ }
+
+ MMRESULT WINAPI waveOutUnprepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
+ {
+ //OutputDebugString(L"waveOutUnprepareHeader\n");
+ return waveOutUnprepareHeader_orig( hwo, pwh, cbwh);
+ }
+
+
+ //MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
+ //{
+ // //OutputDebugString(L"waveOutUnprepareHeader\n");
+ // return waveOutWrite_orig( hwo, pwh, cbwh);
+ //}
+
+ MMRESULT WINAPI waveOutPause( HWAVEOUT hwo)
+ {
+ //OutputDebugString(L"waveOutPause\n");
+ return waveOutPause_orig( hwo);
+ }
+
+ MMRESULT WINAPI waveOutRestart( HWAVEOUT hwo)
+ {
+ //OutputDebugString(L"waveOutRestart\n");
+ return waveOutRestart_orig( hwo);
+ }
+
+ MMRESULT WINAPI waveOutReset( HWAVEOUT hwo)
+ {
+ //OutputDebugString(L"waveOutReset\n");
+ return waveOutReset_orig( hwo);
+ }
+
+ MMRESULT WINAPI waveOutBreakLoop( HWAVEOUT hwo)
+ {
+ //OutputDebugString(L"waveOutBreakLoop\n");
+ return waveOutBreakLoop_orig( hwo);
+ }
+
+ MMRESULT WINAPI waveOutGetPosition( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt)
+ {
+ //OutputDebugString(L"waveOutGetPosition\n");
+ return waveOutGetPosition_orig( hwo, pmmt, cbmmt);
+ }
+
+ MMRESULT WINAPI waveOutGetPitch( HWAVEOUT hwo, LPDWORD pdwPitch)
+ {
+ //OutputDebugString(L"waveOutGetPitch\n");
+ return waveOutGetPitch_orig( hwo, pdwPitch);
+ }
+
+ MMRESULT WINAPI waveOutSetPitch( HWAVEOUT hwo, DWORD dwPitch)
+ {
+ //OutputDebugString(L"waveOutSetPitch\n");
+ return waveOutSetPitch_orig( hwo, dwPitch);
+ }
+
+ MMRESULT WINAPI waveOutGetPlaybackRate( HWAVEOUT hwo, LPDWORD pdwRate)
+ {
+ //OutputDebugString(L"waveOutGetPlaybackRate\n");
+ return waveOutGetPlaybackRate_orig( hwo, pdwRate);
+ }
+
+ MMRESULT WINAPI waveOutSetPlaybackRate( HWAVEOUT hwo, DWORD dwRate)
+ {
+ //OutputDebugString(L"waveOutSetPlaybackRate\n");
+ return waveOutSetPlaybackRate_orig( hwo, dwRate);
+ }
+
+ MMRESULT WINAPI waveOutGetID( HWAVEOUT hwo, LPUINT puDeviceID)
+ {
+ //OutputDebugString(L"waveOutGetID\n");
+ return waveOutGetID_orig( hwo, puDeviceID);
+ }
+
+ MMRESULT WINAPI waveOutMessage( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
+ {
+ //OutputDebugString(L"waveOutMessage\n");
+ return waveOutMessage_orig( hwo, uMsg, dw1, dw2);
+ }
+
+ UINT WINAPI waveInGetNumDevs(void)
+ {
+ //OutputDebugString(L"waveInGetNumDevs\n");
+ return waveInGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI waveInGetDevCapsA( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic)
+ {
+ //OutputDebugString(L"waveInGetDevCapsA\n");
+ return waveInGetDevCapsA_orig( uDeviceID, pwic, cbwic);
+ }
+
+ MMRESULT WINAPI waveInGetDevCapsW( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic)
+ {
+ //OutputDebugString(L"waveInGetDevCapsW\n");
+ return waveInGetDevCapsW_orig( uDeviceID, pwic, cbwic);
+ }
+
+ MMRESULT WINAPI waveInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"waveInGetErrorTextA\n");
+ return waveInGetErrorTextA_orig(mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI waveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"waveInGetErrorTextW\n");
+ return waveInGetErrorTextW_orig(mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI waveInOpen( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"waveInOpen\n");
+ return waveInOpen_orig(phwi, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen);
+ }
+
+ MMRESULT WINAPI waveInClose( HWAVEIN hwi)
+ {
+ //OutputDebugString(L"waveInClose\n");
+ return waveInClose_orig( hwi);
+ }
+
+ MMRESULT WINAPI waveInPrepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
+ {
+ //OutputDebugString(L"waveInPrepareHeader\n");
+ return waveInPrepareHeader_orig( hwi, pwh, cbwh);
+ }
+
+ MMRESULT WINAPI waveInUnprepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
+ {
+ //OutputDebugString(L"waveInUnprepareHeader\n");
+ return waveInUnprepareHeader_orig( hwi, pwh, cbwh);
+ }
+
+ MMRESULT WINAPI waveInAddBuffer( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
+ {
+ //OutputDebugString(L"waveInAddBuffer\n");
+ return waveInAddBuffer_orig( hwi, pwh, cbwh);
+ }
+
+ MMRESULT WINAPI waveInStart( HWAVEIN hwi)
+ {
+ //OutputDebugString(L"waveInStart\n");
+ return waveInStart_orig( hwi);
+ }
+
+ MMRESULT WINAPI waveInStop( HWAVEIN hwi)
+ {
+ //OutputDebugString(L"waveInStop\n");
+ return waveInStop_orig(hwi);
+ }
+
+ MMRESULT WINAPI waveInReset( HWAVEIN hwi)
+ {
+ //OutputDebugString(L"waveInReset\n");
+ return waveInReset_orig(hwi);
+ }
+
+ MMRESULT WINAPI waveInGetPosition( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt)
+ {
+ //OutputDebugString(L"waveInGetPosition\n");
+ return waveInGetPosition_orig( hwi, pmmt, cbmmt);
+ }
+
+ MMRESULT WINAPI waveInGetID( HWAVEIN hwi, LPUINT puDeviceID)
+ {
+ //OutputDebugString(L"waveInGetID\n");
+ return waveInGetID_orig( hwi, puDeviceID);
+ }
+
+ MMRESULT WINAPI waveInMessage( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
+ {
+ //OutputDebugString(L"waveInMessage\n");
+ return waveInMessage_orig( hwi, uMsg, dw1, dw2);
+ }
+
+ UINT WINAPI midiOutGetNumDevs(void)
+ {
+ //OutputDebugString(L"midiOutGetNumDevs\n");
+ return midiOutGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI midiStreamOpen( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"midiStreamOpen\n");
+ return midiStreamOpen_orig( phms, puDeviceID, cMidi, dwCallback, dwInstance, fdwOpen);
+ }
+
+ MMRESULT WINAPI midiStreamClose( HMIDISTRM hms)
+ {
+ //OutputDebugString(L"midiStreamClose\n");
+ return midiStreamClose_orig( hms);
+ }
+
+ MMRESULT WINAPI midiStreamProperty( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty)
+ {
+ //OutputDebugString(L"midiStreamProperty\n");
+ return midiStreamProperty_orig( hms, lppropdata, dwProperty);
+ }
+
+ MMRESULT WINAPI midiStreamPosition( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt)
+ {
+ //OutputDebugString(L"midiStreamPosition\n");
+ return midiStreamPosition_orig( hms, lpmmt, cbmmt);
+ }
+
+ MMRESULT WINAPI midiStreamOut( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiStreamOut\n");
+ return midiStreamOut_orig( hms, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiStreamPause( HMIDISTRM hms)
+ {
+ //OutputDebugString(L"midiStreamPause\n");
+ return midiStreamPause_orig( hms);
+ }
+
+ MMRESULT WINAPI midiStreamRestart( HMIDISTRM hms)
+ {
+ //OutputDebugString(L"midiStreamRestart\n");
+ return midiStreamRestart_orig( hms);
+ }
+
+ MMRESULT WINAPI midiStreamStop( HMIDISTRM hms)
+ {
+ //OutputDebugString(L"midiStreamStop\n");
+ return midiStreamStop_orig( hms);
+ }
+
+ MMRESULT WINAPI midiConnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved)
+ {
+ //OutputDebugString(L"midiConnect\n");
+ return midiConnect_orig( hmi, hmo, pReserved);
+ }
+
+ MMRESULT WINAPI midiDisconnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved)
+ {
+ //OutputDebugString(L"midiDisconnect\n");
+ return midiDisconnect_orig( hmi, hmo, pReserved);
+ }
+
+ MMRESULT WINAPI midiOutGetDevCapsA( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc)
+ {
+ //OutputDebugString(L"midiOutGetDevCapsA\n");
+ return midiOutGetDevCapsA_orig( uDeviceID, pmoc, cbmoc);
+ }
+
+ MMRESULT WINAPI midiOutGetDevCapsW( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc)
+ {
+ //OutputDebugString(L"midiOutGetDevCapsW\n");
+ return midiOutGetDevCapsW_orig( uDeviceID, pmoc, cbmoc);
+ }
+
+ MMRESULT WINAPI midiOutGetVolume( HMIDIOUT hmo, LPDWORD pdwVolume)
+ {
+ //OutputDebugString(L"midiOutGetVolume\n");
+ return midiOutGetVolume_orig( hmo, pdwVolume);
+ }
+
+ MMRESULT WINAPI midiOutSetVolume( HMIDIOUT hmo, DWORD dwVolume)
+ {
+ //OutputDebugString(L"midiOutSetVolume\n");
+ return midiOutSetVolume_orig( hmo, dwVolume);
+ }
+
+ MMRESULT WINAPI midiOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"midiOutGetErrorTextA\n");
+ return midiOutGetErrorTextA_orig( mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI midiOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"midiOutGetErrorTextW\n");
+ return midiOutGetErrorTextW_orig( mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI midiOutOpen( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"midiOutOpen\n");
+ return midiOutOpen_orig(phmo, uDeviceID, dwCallback, dwInstance, fdwOpen);
+ }
+
+ MMRESULT WINAPI midiOutClose( HMIDIOUT hmo)
+ {
+ //OutputDebugString(L"midiOutClose\n");
+ return midiOutClose_orig( hmo);
+ }
+
+ MMRESULT WINAPI midiOutPrepareHeader( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiOutPrepareHeader\n");
+ return midiOutPrepareHeader_orig( hmo, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiOutUnprepareHeader\n");
+ return midiOutUnprepareHeader_orig(hmo, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiOutShortMsg( HMIDIOUT hmo, DWORD dwMsg)
+ {
+ //OutputDebugString(L"midiOutShortMsg\n");
+ return midiOutShortMsg_orig( hmo, dwMsg);
+ }
+
+ MMRESULT WINAPI midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiOutLongMsg\n");
+ return midiOutLongMsg_orig(hmo, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiOutReset( HMIDIOUT hmo)
+ {
+ //OutputDebugString(L"midiOutReset\n");
+ return midiOutReset_orig( hmo);
+ }
+
+ MMRESULT WINAPI midiOutCachePatches( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache)
+ {
+ //OutputDebugString(L"midiOutCachePatches\n");
+ return midiOutCachePatches_orig( hmo, uBank, pwpa, fuCache);
+ }
+
+ MMRESULT WINAPI midiOutCacheDrumPatches( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache)
+ {
+ //OutputDebugString(L"midiOutCacheDrumPatches\n");
+ return midiOutCacheDrumPatches_orig( hmo, uPatch, pwkya, fuCache);
+ }
+
+ MMRESULT WINAPI midiOutGetID( HMIDIOUT hmo, LPUINT puDeviceID)
+ {
+ //OutputDebugString(L"midiOutGetID\n");
+ return midiOutGetID_orig( hmo, puDeviceID);
+ }
+
+ MMRESULT WINAPI midiOutMessage( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
+ {
+ //OutputDebugString(L"midiOutMessage\n");
+ return midiOutMessage_orig( hmo, uMsg, dw1, dw2);
+ }
+
+ UINT WINAPI midiInGetNumDevs(void)
+ {
+ //OutputDebugString(L"midiInGetNumDevs\n");
+ return midiInGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI midiInGetDevCapsA( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic)
+ {
+ //OutputDebugString(L"midiInGetDevCapsA\n");
+ return midiInGetDevCapsA_orig( uDeviceID, pmic, cbmic);
+ }
+
+ MMRESULT WINAPI midiInGetDevCapsW( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic)
+ {
+ //OutputDebugString(L"midiInGetDevCapsW\n");
+ return midiInGetDevCapsW_orig( uDeviceID, pmic, cbmic);
+ }
+
+ MMRESULT WINAPI midiInGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"midiInGetErrorTextA\n");
+ return midiInGetErrorTextA_orig( mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI midiInGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"midiInGetErrorTextW\n");
+ return midiInGetErrorTextW_orig( mmrError, pszText, cchText);
+ }
+
+ MMRESULT WINAPI midiInOpen( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"midiInOpen\n");
+ return midiInOpen_orig(phmi, uDeviceID, dwCallback, dwInstance, fdwOpen);
+ }
+
+ MMRESULT WINAPI midiInClose( HMIDIIN hmi)
+ {
+ //OutputDebugString(L"midiInClose\n");
+ return midiInClose_orig( hmi);
+ }
+
+ MMRESULT WINAPI midiInPrepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiInPrepareHeader\n");
+ return midiInPrepareHeader_orig( hmi, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiInUnprepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiInUnprepareHeader\n");
+ return midiInUnprepareHeader_orig( hmi, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiInAddBuffer( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh)
+ {
+ //OutputDebugString(L"midiInAddBuffer\n");
+ return midiInAddBuffer_orig( hmi, pmh, cbmh);
+ }
+
+ MMRESULT WINAPI midiInStart( HMIDIIN hmi)
+ {
+ //OutputDebugString(L"midiInStart\n");
+ return midiInStart_orig( hmi);
+ }
+
+ MMRESULT WINAPI midiInStop( HMIDIIN hmi)
+ {
+ //OutputDebugString(L"midiInStop\n");
+ return midiInStop_orig(hmi);
+ }
+
+ MMRESULT WINAPI midiInReset( HMIDIIN hmi)
+ {
+ //OutputDebugString(L"midiInReset\n");
+ return midiInReset_orig( hmi);
+ }
+
+ MMRESULT WINAPI midiInGetID( HMIDIIN hmi, LPUINT puDeviceID)
+ {
+ //OutputDebugString(L"midiInGetID\n");
+ return midiInGetID_orig( hmi, puDeviceID);
+ }
+
+ MMRESULT WINAPI midiInMessage( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
+ {
+ //OutputDebugString(L"midiInMessage\n");
+ return midiInMessage_orig( hmi, uMsg, dw1, dw2);
+ }
+
+ UINT WINAPI auxGetNumDevs(void)
+ {
+ //OutputDebugString(L"auxGetNumDevs\n");
+ return auxGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI auxGetDevCapsA( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac)
+ {
+ //OutputDebugString(L"auxGetDevCapsA\n");
+ return auxGetDevCapsA_orig( uDeviceID, pac, cbac);
+ }
+
+ MMRESULT WINAPI auxGetDevCapsW( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac)
+ {
+ //OutputDebugString(L"auxGetDevCapsW\n");
+ return auxGetDevCapsW_orig( uDeviceID, pac, cbac);
+ }
+
+ MMRESULT WINAPI auxSetVolume( UINT uDeviceID, DWORD dwVolume)
+ {
+ //OutputDebugString(L"auxSetVolume\n");
+ return auxSetVolume_orig( uDeviceID, dwVolume);
+ }
+
+ MMRESULT WINAPI auxGetVolume( UINT uDeviceID, LPDWORD pdwVolume)
+ {
+ //OutputDebugString(L"auxGetVolume\n");
+ return auxGetVolume_orig( uDeviceID, pdwVolume);
+ }
+
+ MMRESULT WINAPI auxOutMessage( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
+ {
+ //OutputDebugString(L"auxOutMessage\n");
+ return auxOutMessage_orig( uDeviceID, uMsg, dw1, dw2);
+ }
+
+ UINT WINAPI mixerGetNumDevs(void)
+ {
+ //OutputDebugString(L"mixerGetNumDevs\n");
+ return mixerGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI mixerGetDevCapsA( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps)
+ {
+ //OutputDebugString(L"mixerGetDevCapsA\n");
+ return mixerGetDevCapsA_orig( uMxId, pmxcaps, cbmxcaps);
+ }
+
+ MMRESULT WINAPI mixerGetDevCapsW( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps)
+ {
+ //OutputDebugString(L"mixerGetDevCapsW\n");
+ return mixerGetDevCapsW_orig( uMxId, pmxcaps, cbmxcaps);
+ }
+
+ MMRESULT WINAPI mixerOpen( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"mixerOpen\n");
+ return mixerOpen_orig( phmx, uMxId, dwCallback, dwInstance, fdwOpen);
+ }
+
+ MMRESULT WINAPI mixerClose( HMIXER hmx)
+ {
+ //OutputDebugString(L"mixerClose\n");
+ return mixerClose_orig( hmx);
+ }
+
+ DWORD WINAPI mixerMessage( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+ {
+ //OutputDebugString(L"mixerMessage\n");
+ return mixerMessage_orig( hmx, uMsg, dwParam1, dwParam2);
+ }
+
+ MMRESULT WINAPI mixerGetLineInfoA( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo)
+ {
+ //OutputDebugString(L"mixerGetLineInfoA\n");
+ return mixerGetLineInfoA_orig( hmxobj, pmxl, fdwInfo);
+ }
+
+ MMRESULT WINAPI mixerGetLineInfoW( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo)
+ {
+ //OutputDebugString(L"mixerGetLineInfoW\n");
+ return mixerGetLineInfoW_orig( hmxobj, pmxl, fdwInfo);
+ }
+
+ MMRESULT WINAPI mixerGetID( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId)
+ {
+ //OutputDebugString(L"mixerGetID\n");
+ return mixerGetID_orig( hmxobj, puMxId, fdwId);
+ }
+
+ MMRESULT WINAPI mixerGetLineControlsA( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls)
+ {
+ //OutputDebugString(L"mixerGetLineControlsA\n");
+ return mixerGetLineControlsA_orig( hmxobj, pmxlc, fdwControls);
+ }
+
+ MMRESULT WINAPI mixerGetLineControlsW( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls)
+ {
+ //OutputDebugString(L"mixerGetLineControlsW\n");
+ return mixerGetLineControlsW_orig( hmxobj, pmxlc, fdwControls);
+ }
+
+ MMRESULT WINAPI mixerGetControlDetailsA( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
+ {
+ //OutputDebugString(L"mixerGetControlDetailsA\n");
+ return mixerGetControlDetailsA_orig( hmxobj, pmxcd, fdwDetails);
+ }
+
+ MMRESULT WINAPI mixerGetControlDetailsW( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
+ {
+ //OutputDebugString(L"mixerGetControlDetailsW\n");
+ return mixerGetControlDetailsW_orig( hmxobj, pmxcd, fdwDetails);
+ }
+
+ MMRESULT WINAPI mixerSetControlDetails( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
+ {
+ //OutputDebugString(L"mixerSetControlDetails\n");
+ return mixerSetControlDetails_orig( hmxobj, pmxcd, fdwDetails);
+ }
+
+ DWORD WINAPI mmGetCurrentTask(void)
+ {
+ //OutputDebugString(L"mmGetCurrentTask\n");
+ return mmGetCurrentTask_orig();
+ }
+
+ void WINAPI mmTaskBlock(DWORD val)
+ {
+ //OutputDebugString(L"mmTaskBlock\n");
+ return mmTaskBlock_orig(val);
+ }
+
+ UINT WINAPI mmTaskCreate(LPTASKCALLBACK a, HANDLE* b, DWORD_PTR c)
+ {
+ //OutputDebugString(L"mmTaskCreate\n");
+ return mmTaskCreate_orig(a, b, c);
+ }
+
+ BOOL WINAPI mmTaskSignal(DWORD a)
+ {
+ //OutputDebugString(L"mmTaskSignal\n");
+ return mmTaskSignal_orig(a);
+ }
+
+ VOID WINAPI mmTaskYield()
+ {
+ //OutputDebugString(L"mmTaskYield\n");
+ mmTaskYield_orig();
+ }
+
+ MMRESULT WINAPI timeGetSystemTime( LPMMTIME pmmt, UINT cbmmt)
+ {
+ //OutputDebugString(L"timeGetSystemTime\n");
+ return timeGetSystemTime_orig( pmmt, cbmmt);
+ }
+
+ DWORD WINAPI timeGetTime(void)
+ {
+ //OutputDebugString(L"timeGetTime\n");
+ return timeGetTime_orig();
+ }
+
+ MMRESULT WINAPI timeSetEvent( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent)
+ {
+ //OutputDebugString(L"timeSetEvent\n");
+ return timeSetEvent_orig(uDelay, uResolution, fptc, dwUser, fuEvent);
+ }
+
+ MMRESULT WINAPI timeKillEvent( UINT uTimerID)
+ {
+ //OutputDebugString(L"timeKillEvent\n");
+ return timeKillEvent_orig( uTimerID);
+ }
+
+ MMRESULT WINAPI timeGetDevCaps( LPTIMECAPS ptc, UINT cbtc)
+ {
+ //OutputDebugString(L"timeGetDevCaps\n");
+ return timeGetDevCaps_orig( ptc, cbtc);
+ }
+
+ MMRESULT WINAPI timeBeginPeriod( UINT uPeriod)
+ {
+ //OutputDebugString(L"timeBeginPeriod\n");
+ return timeBeginPeriod_orig( uPeriod);
+ }
+
+ MMRESULT WINAPI timeEndPeriod( UINT uPeriod)
+ {
+ //OutputDebugString(L"timeEndPeriod\n");
+ return timeEndPeriod_orig( uPeriod);
+ }
+
+ UINT WINAPI joyGetNumDevs(void)
+ {
+ //OutputDebugString(L"joyGetNumDevs\n");
+ return joyGetNumDevs_orig();
+ }
+
+ MMRESULT WINAPI joyConfigChanged(DWORD dwFlags)
+ {
+ //OutputDebugString(L"joyConfigChanged\n");
+ return joyConfigChanged_orig(dwFlags);
+ }
+
+ MMRESULT WINAPI joyGetDevCapsA( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc)
+ {
+ //OutputDebugString(L"joyGetDevCapsA\n");
+ return joyGetDevCapsA_orig( uJoyID, pjc, cbjc);
+ }
+
+ MMRESULT WINAPI joyGetDevCapsW( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc)
+ {
+ //OutputDebugString(L"joyGetDevCapsW\n");
+ return joyGetDevCapsW_orig( uJoyID, pjc, cbjc);
+ }
+
+ MMRESULT WINAPI joyGetPos( UINT uJoyID, LPJOYINFO pji)
+ {
+ //OutputDebugString(L"joyGetPos\n");
+ return joyGetPos_orig( uJoyID, pji);
+ }
+
+ MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji)
+ {
+ //OutputDebugString(L"joyGetPosEx\n");
+ return joyGetPosEx_orig( uJoyID, pji);
+ }
+
+ MMRESULT WINAPI joyGetThreshold( UINT uJoyID, LPUINT puThreshold)
+ {
+ //OutputDebugString(L"joyGetThreshold\n");
+ return joyGetThreshold_orig( uJoyID, puThreshold);
+ }
+
+ MMRESULT WINAPI joyReleaseCapture( UINT uJoyID)
+ {
+ //OutputDebugString(L"joyReleaseCapture\n");
+ return joyReleaseCapture_orig( uJoyID);
+ }
+
+ MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged)
+ {
+ //OutputDebugString(L"joySetCapture\n");
+ return joySetCapture_orig(hwnd, uJoyID, uPeriod, fChanged);
+ }
+
+ MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold)
+ {
+ //OutputDebugString(L"joySetThreshold\n");
+ return joySetThreshold_orig( uJoyID, uThreshold);
+ }
+
+ BOOL WINAPI mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus)
+ {
+ //OutputDebugString(L"mciDriverNotify\n");
+ return mciDriverNotify_orig(hwndCallback, uDeviceID, uStatus);
+ }
+
+ UINT WINAPI mciDriverYield(UINT uDeviceID)
+ {
+ //OutputDebugString(L"mciDriverYield\n");
+ return mciDriverYield_orig(uDeviceID);
+ }
+
+ FOURCC WINAPI mmioStringToFOURCCA( LPCSTR sz, UINT uFlags)
+ {
+ //OutputDebugString(L"mmioStringToFOURCCA\n");
+ return mmioStringToFOURCCA_orig( sz, uFlags);
+ }
+
+ FOURCC WINAPI mmioStringToFOURCCW( LPCWSTR sz, UINT uFlags)
+ {
+ //OutputDebugString(L"mmioStringToFOURCCW\n");
+ return mmioStringToFOURCCW_orig( sz, uFlags);
+ }
+
+ LPMMIOPROC WINAPI mmioInstallIOProcA( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
+ {
+ //OutputDebugString(L"mmioInstallIOProcA\n");
+ return mmioInstallIOProcA_orig( fccIOProc, pIOProc, dwFlags);
+ }
+
+ LPMMIOPROC WINAPI mmioInstallIOProcW( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
+ {
+ //OutputDebugString(L"mmioInstallIOProcW\n");
+ return mmioInstallIOProcW_orig( fccIOProc, pIOProc, dwFlags);
+ }
+
+ HMMIO WINAPI mmioOpenA( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"mmioOpenA\n");
+ return mmioOpenA_orig( pszFileName, pmmioinfo, fdwOpen);
+ }
+
+ HMMIO WINAPI mmioOpenW( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen)
+ {
+ //OutputDebugString(L"mmioOpenW\n");
+ return mmioOpenW_orig( pszFileName, pmmioinfo, fdwOpen);
+ }
+
+ MMRESULT WINAPI mmioRenameA( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename)
+ {
+ //OutputDebugString(L"mmioRenameA\n");
+ return mmioRenameA_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename);
+ }
+
+ MMRESULT WINAPI mmioRenameW( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename)
+ {
+ //OutputDebugString(L"mmioRenameW\n");
+ return mmioRenameW_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename);
+ }
+
+ MMRESULT WINAPI mmioClose( HMMIO hmmio, UINT fuClose)
+ {
+ //OutputDebugString(L"mmioClose\n");
+ return mmioClose_orig( hmmio, fuClose);
+ }
+
+ LONG WINAPI mmioRead( HMMIO hmmio, HPSTR pch, LONG cch)
+ {
+ //OutputDebugString(L"mmioRead\n");
+ return mmioRead_orig( hmmio, pch, cch);
+ }
+
+ LONG WINAPI mmioWrite( HMMIO hmmio, const char _huge* pch, LONG cch)
+ {
+ //OutputDebugString(L"mmioWrite\n");
+ return mmioWrite_orig( hmmio, pch, cch);
+ }
+
+ LONG WINAPI mmioSeek( HMMIO hmmio, LONG lOffset, int iOrigin)
+ {
+ //OutputDebugString(L"mmioSeek\n");
+ return mmioSeek_orig(hmmio, lOffset, iOrigin);
+ }
+
+ MMRESULT WINAPI mmioGetInfo( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo)
+ {
+ //OutputDebugString(L"mmioGetInfo\n");
+ return mmioGetInfo_orig( hmmio, pmmioinfo, fuInfo);
+ }
+
+ MMRESULT WINAPI mmioSetInfo( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo)
+ {
+ //OutputDebugString(L"mmioSetInfo\n");
+ return mmioSetInfo_orig( hmmio, pmmioinfo, fuInfo);
+ }
+
+ MMRESULT WINAPI mmioSetBuffer( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer)
+ {
+ //OutputDebugString(L"mmioSetBuffer\n");
+ return mmioSetBuffer_orig(hmmio, pchBuffer, cchBuffer, fuBuffer);
+ }
+
+ MMRESULT WINAPI mmioFlush( HMMIO hmmio, UINT fuFlush)
+ {
+ //OutputDebugString(L"mmioFlush\n");
+ return mmioFlush_orig( hmmio, fuFlush);
+ }
+
+ MMRESULT WINAPI mmioAdvance( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance)
+ {
+ //OutputDebugString(L"mmioAdvance\n");
+ return mmioAdvance_orig( hmmio, pmmioinfo, fuAdvance);
+ }
+
+ LRESULT WINAPI mmioSendMessage( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
+ {
+ //OutputDebugString(L"mmioSendMessage\n");
+ return mmioSendMessage_orig(hmmio, uMsg, lParam1, lParam2);
+ }
+
+ MMRESULT WINAPI mmioDescend( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend)
+ {
+ //OutputDebugString(L"mmioDescend\n");
+ return mmioDescend_orig(hmmio, pmmcki, pmmckiParent, fuDescend);
+ }
+
+ MMRESULT WINAPI mmioAscend( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend)
+ {
+ //OutputDebugString(L"mmioAscend\n");
+ return mmioAscend_orig( hmmio, pmmcki, fuAscend);
+ }
+
+ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate)
+ {
+ //OutputDebugString(L"mmioCreateChunk\n");
+ return mmioCreateChunk_orig(hmmio, pmmcki, fuCreate);
+ }
+
+ MCIERROR WINAPI mciSendCommandA( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+ {
+ //OutputDebugString(L"mciSendCommandA\n");
+ return mciSendCommandA_orig( mciId, uMsg, dwParam1, dwParam2);
+ }
+
+ MCIERROR WINAPI mciSendCommandW( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+ {
+ //OutputDebugString(L"mciSendCommandW\n");
+ return mciSendCommandW_orig( mciId, uMsg, dwParam1, dwParam2);
+ }
+
+ MCIERROR WINAPI mciSendStringA( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
+ {
+ //OutputDebugString(L"mciSendStringA\n");
+ return mciSendStringA_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback);
+ }
+
+ MCIERROR WINAPI mciSendStringW( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
+ {
+ //OutputDebugString(L"mciSendStringW\n");
+ return mciSendStringW_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback);
+ }
+
+ MCIDEVICEID WINAPI mciGetDeviceIDA( LPCSTR pszDevice)
+ {
+ //OutputDebugString(L"mciGetDeviceIDA\n");
+ return mciGetDeviceIDA_orig( pszDevice);
+ }
+
+ MCIDEVICEID WINAPI mciGetDeviceIDW( LPCWSTR pszDevice)
+ {
+ //OutputDebugString(L"mciGetDeviceIDW\n");
+ return mciGetDeviceIDW_orig( pszDevice);
+ }
+
+ MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA( DWORD dwElementID, LPCSTR lpstrType )
+ {
+ //OutputDebugString(L"mciGetDeviceIDFromElementIDA\n");
+ return mciGetDeviceIDFromElementIDA_orig( dwElementID, lpstrType );
+ }
+
+ MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW( DWORD dwElementID, LPCWSTR lpstrType )
+ {
+ //OutputDebugString(L"mciGetDeviceIDFromElementIDW\n");
+ return mciGetDeviceIDFromElementIDW_orig( dwElementID, lpstrType );
+ }
+
+ DWORD_PTR WINAPI mciGetDriverData(UINT uDeviceID)
+ {
+ //OutputDebugString(L"mciGetDriverData\n");
+ return mciGetDriverData_orig(uDeviceID);
+ }
+
+ BOOL WINAPI mciGetErrorStringA( MCIERROR mcierr, LPSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"mciGetErrorStringA\n");
+ return mciGetErrorStringA_orig( mcierr, pszText, cchText);
+ }
+
+ BOOL WINAPI mciGetErrorStringW( MCIERROR mcierr, LPWSTR pszText, UINT cchText)
+ {
+ //OutputDebugString(L"mciGetErrorStringW\n");
+ return mciGetErrorStringW_orig( mcierr, pszText, cchText);
+ }
+
+ BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD_PTR dwData)
+ {
+ //OutputDebugString(L"mciSetDriverData_type\n");
+ return mciSetDriverData_orig( uDeviceID, dwData );
+ }
+
+ BOOL WINAPI mciSetYieldProc( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData)
+ {
+ //OutputDebugString(L"mciSetYieldProc\n");
+ return mciSetYieldProc_orig(mciId, fpYieldProc, dwYieldData);
+ }
+
+ BOOL WINAPI mciFreeCommandResource(UINT uTable)
+ {
+ //OutputDebugString(L"mciFreeCommandResource\n");
+ return mciFreeCommandResource_orig(uTable);
+ }
+
+ HTASK WINAPI mciGetCreatorTask( MCIDEVICEID mciId)
+ {
+ //OutputDebugString(L"mciGetCreatorTask\n");
+ return mciGetCreatorTask_orig( mciId);
+ }
+
+ YIELDPROC WINAPI mciGetYieldProc( MCIDEVICEID mciId, LPDWORD pdwYieldData)
+ {
+ //OutputDebugString(L"mciGetYieldProc\n");
+ return mciGetYieldProc_orig( mciId, pdwYieldData);
+ }
+
+ UINT WINAPI mciLoadCommandResource(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType)
+ {
+ //OutputDebugString(L"mciLoadCommandResource");
+ return mciLoadCommandResource_orig(hInstance, lpResName, uType);
+ }
+
+
+ BOOL WINAPI mciExecute(LPCSTR pszCommand)
+ {
+ //OutputDebugString(L"mciExecute\n");
+ return mciExecute_orig(pszCommand);
+ }
+}
diff --git a/indra/media_plugins/winmmshim/forwarding_api.h b/indra/media_plugins/winmmshim/forwarding_api.h
new file mode 100644
index 0000000000..31e2186aa2
--- /dev/null
+++ b/indra/media_plugins/winmmshim/forwarding_api.h
@@ -0,0 +1,395 @@
+/**
+ * @file forwarding_api.h
+ * @brief forwards winmm API calls to real winmm.dll
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+// this turns off __declspec(dllimport) for the functions declared in mmsystem.h
+#define _WINMM_
+#include <windows.h>
+#include <mmsystem.h>
+
+void init_function_pointers(HMODULE winmm_handle);
+
+typedef VOID (*LPTASKCALLBACK)(DWORD_PTR dwInst);
+
+typedef LRESULT (WINAPI *CloseDriver_type)( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
+extern CloseDriver_type CloseDriver_orig;
+typedef HDRVR (WINAPI *OpenDriver_type)( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2);
+extern OpenDriver_type OpenDriver_orig;
+typedef LRESULT (WINAPI *SendDriverMessage_type)( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2);
+extern SendDriverMessage_type SendDriverMessage_orig;
+typedef HMODULE (WINAPI *DrvGetModuleHandle_type)( HDRVR hDriver);
+extern DrvGetModuleHandle_type DrvGetModuleHandle_orig;
+typedef HMODULE (WINAPI *GetDriverModuleHandle_type)( HDRVR hDriver);
+extern GetDriverModuleHandle_type GetDriverModuleHandle_orig;
+typedef LRESULT (WINAPI *DefDriverProc_type)( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
+extern DefDriverProc_type DefDriverProc_orig;
+typedef BOOL (WINAPI *DriverCallback_type)(DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
+extern DriverCallback_type DriverCallback_orig;
+typedef UINT (WINAPI *mmsystemGetVersion_type)(void);
+extern mmsystemGetVersion_type mmsystemGetVersion_orig;
+typedef BOOL (WINAPI *sndPlaySoundA_type)( LPCSTR pszSound, UINT fuSound);
+extern sndPlaySoundA_type sndPlaySoundA_orig;
+typedef BOOL (WINAPI *sndPlaySoundW_type)( LPCWSTR pszSound, UINT fuSound);
+extern sndPlaySoundW_type sndPlaySoundW_orig;
+typedef BOOL (WINAPI *PlaySoundA_type)( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
+extern PlaySoundA_type PlaySoundA_orig;
+typedef BOOL (WINAPI *PlaySoundW_type)( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
+extern PlaySoundW_type PlaySoundW_orig;
+typedef UINT (WINAPI *waveOutGetNumDevs_type)(void);
+extern waveOutGetNumDevs_type waveOutGetNumDevs_orig;
+typedef MMRESULT (WINAPI *waveOutGetDevCapsA_type)( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc);
+extern waveOutGetDevCapsA_type waveOutGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *waveOutGetDevCapsW_type)( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc);
+extern waveOutGetDevCapsW_type waveOutGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *waveOutGetVolume_type)( HWAVEOUT hwo, LPDWORD pdwVolume);
+extern waveOutGetVolume_type waveOutGetVolume_orig;
+typedef MMRESULT (WINAPI *waveOutSetVolume_type)( HWAVEOUT hwo, DWORD dwVolume);
+extern waveOutSetVolume_type waveOutSetVolume_orig;
+typedef MMRESULT (WINAPI *waveOutGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
+extern waveOutGetErrorTextA_type waveOutGetErrorTextA_orig;
+typedef MMRESULT (WINAPI *waveOutGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
+extern waveOutGetErrorTextW_type waveOutGetErrorTextW_orig;
+typedef MMRESULT (WINAPI *waveOutOpen_type)( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
+extern waveOutOpen_type waveOutOpen_orig;
+typedef MMRESULT (WINAPI *waveOutClose_type)( HWAVEOUT hwo);
+extern waveOutClose_type waveOutClose_orig;
+typedef MMRESULT (WINAPI *waveOutPrepareHeader_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
+extern waveOutPrepareHeader_type waveOutPrepareHeader_orig;
+typedef MMRESULT (WINAPI *waveOutUnprepareHeader_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
+extern waveOutUnprepareHeader_type waveOutUnprepareHeader_orig;
+typedef MMRESULT (WINAPI *waveOutWrite_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
+extern waveOutWrite_type waveOutWrite_orig;
+typedef MMRESULT (WINAPI *waveOutPause_type)( HWAVEOUT hwo);
+extern waveOutPause_type waveOutPause_orig;
+typedef MMRESULT (WINAPI *waveOutRestart_type)( HWAVEOUT hwo);
+extern waveOutRestart_type waveOutRestart_orig;
+typedef MMRESULT (WINAPI *waveOutReset_type)( HWAVEOUT hwo);
+extern waveOutReset_type waveOutReset_orig;
+typedef MMRESULT (WINAPI *waveOutBreakLoop_type)( HWAVEOUT hwo);
+extern waveOutBreakLoop_type waveOutBreakLoop_orig;
+typedef MMRESULT (WINAPI *waveOutGetPosition_type)( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt);
+extern waveOutGetPosition_type waveOutGetPosition_orig;
+typedef MMRESULT (WINAPI *waveOutGetPitch_type)( HWAVEOUT hwo, LPDWORD pdwPitch);
+extern waveOutGetPitch_type waveOutGetPitch_orig;
+typedef MMRESULT (WINAPI *waveOutSetPitch_type)( HWAVEOUT hwo, DWORD dwPitch);
+extern waveOutSetPitch_type waveOutSetPitch_orig;
+typedef MMRESULT (WINAPI *waveOutGetPlaybackRate_type)( HWAVEOUT hwo, LPDWORD pdwRate);
+extern waveOutGetPlaybackRate_type waveOutGetPlaybackRate_orig;
+typedef MMRESULT (WINAPI *waveOutSetPlaybackRate_type)( HWAVEOUT hwo, DWORD dwRate);
+extern waveOutSetPlaybackRate_type waveOutSetPlaybackRate_orig;
+typedef MMRESULT (WINAPI *waveOutGetID_type)( HWAVEOUT hwo, LPUINT puDeviceID);
+extern waveOutGetID_type waveOutGetID_orig;
+typedef MMRESULT (WINAPI *waveOutMessage_type)( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
+extern waveOutMessage_type waveOutMessage_orig;
+typedef UINT (WINAPI *waveInGetNumDevs_type)(void);
+extern waveInGetNumDevs_type waveInGetNumDevs_orig;
+typedef MMRESULT (WINAPI *waveInGetDevCapsA_type)( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic);
+extern waveInGetDevCapsA_type waveInGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *waveInGetDevCapsW_type)( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic);
+extern waveInGetDevCapsW_type waveInGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *waveInGetErrorTextA_type)(MMRESULT mmrError, LPSTR pszText, UINT cchText);
+extern waveInGetErrorTextA_type waveInGetErrorTextA_orig;
+typedef MMRESULT (WINAPI *waveInGetErrorTextW_type)(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
+extern waveInGetErrorTextW_type waveInGetErrorTextW_orig;
+typedef MMRESULT (WINAPI *waveInOpen_type)( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
+extern waveInOpen_type waveInOpen_orig;
+typedef MMRESULT (WINAPI *waveInClose_type)( HWAVEIN hwi);
+extern waveInClose_type waveInClose_orig;
+typedef MMRESULT (WINAPI *waveInPrepareHeader_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
+extern waveInPrepareHeader_type waveInPrepareHeader_orig;
+typedef MMRESULT (WINAPI *waveInUnprepareHeader_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
+extern waveInUnprepareHeader_type waveInUnprepareHeader_orig;
+typedef MMRESULT (WINAPI *waveInAddBuffer_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
+extern waveInAddBuffer_type waveInAddBuffer_orig;
+typedef MMRESULT (WINAPI *waveInStart_type)( HWAVEIN hwi);
+extern waveInStart_type waveInStart_orig;
+typedef MMRESULT (WINAPI *waveInStop_type)( HWAVEIN hwi);
+extern waveInStop_type waveInStop_orig;
+typedef MMRESULT (WINAPI *waveInReset_type)( HWAVEIN hwi);
+extern waveInReset_type waveInReset_orig;
+typedef MMRESULT (WINAPI *waveInGetPosition_type)( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt);
+extern waveInGetPosition_type waveInGetPosition_orig;
+typedef MMRESULT (WINAPI *waveInGetID_type)( HWAVEIN hwi, LPUINT puDeviceID);
+extern waveInGetID_type waveInGetID_orig;
+typedef MMRESULT (WINAPI *waveInMessage_type)( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
+extern waveInMessage_type waveInMessage_orig;
+typedef UINT (WINAPI *midiOutGetNumDevs_type)(void);
+extern midiOutGetNumDevs_type midiOutGetNumDevs_orig;
+typedef MMRESULT (WINAPI *midiStreamOpen_type)( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
+extern midiStreamOpen_type midiStreamOpen_orig;
+typedef MMRESULT (WINAPI *midiStreamClose_type)( HMIDISTRM hms);
+extern midiStreamClose_type midiStreamClose_orig;
+typedef MMRESULT (WINAPI *midiStreamProperty_type)( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty);
+extern midiStreamProperty_type midiStreamProperty_orig;
+typedef MMRESULT (WINAPI *midiStreamPosition_type)( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
+extern midiStreamPosition_type midiStreamPosition_orig;
+typedef MMRESULT (WINAPI *midiStreamOut_type)( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh);
+extern midiStreamOut_type midiStreamOut_orig;
+typedef MMRESULT (WINAPI *midiStreamPause_type)( HMIDISTRM hms);
+extern midiStreamPause_type midiStreamPause_orig;
+typedef MMRESULT (WINAPI *midiStreamRestart_type)( HMIDISTRM hms);
+extern midiStreamRestart_type midiStreamRestart_orig;
+typedef MMRESULT (WINAPI *midiStreamStop_type)( HMIDISTRM hms);
+extern midiStreamStop_type midiStreamStop_orig;
+typedef MMRESULT (WINAPI *midiConnect_type)( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
+extern midiConnect_type midiConnect_orig;
+typedef MMRESULT (WINAPI *midiDisconnect_type)( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
+extern midiDisconnect_type midiDisconnect_orig;
+typedef MMRESULT (WINAPI *midiOutGetDevCapsA_type)( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc);
+extern midiOutGetDevCapsA_type midiOutGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *midiOutGetDevCapsW_type)( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc);
+extern midiOutGetDevCapsW_type midiOutGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *midiOutGetVolume_type)( HMIDIOUT hmo, LPDWORD pdwVolume);
+extern midiOutGetVolume_type midiOutGetVolume_orig;
+typedef MMRESULT (WINAPI *midiOutSetVolume_type)( HMIDIOUT hmo, DWORD dwVolume);
+extern midiOutSetVolume_type midiOutSetVolume_orig;
+typedef MMRESULT (WINAPI *midiOutGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
+extern midiOutGetErrorTextA_type midiOutGetErrorTextA_orig;
+typedef MMRESULT (WINAPI *midiOutGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
+extern midiOutGetErrorTextW_type midiOutGetErrorTextW_orig;
+typedef MMRESULT (WINAPI *midiOutOpen_type)( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
+extern midiOutOpen_type midiOutOpen_orig;
+typedef MMRESULT (WINAPI *midiOutClose_type)( HMIDIOUT hmo);
+extern midiOutClose_type midiOutClose_orig;
+typedef MMRESULT (WINAPI *midiOutPrepareHeader_type)( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
+extern midiOutPrepareHeader_type midiOutPrepareHeader_orig;
+typedef MMRESULT (WINAPI *midiOutUnprepareHeader_type)(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
+extern midiOutUnprepareHeader_type midiOutUnprepareHeader_orig;
+typedef MMRESULT (WINAPI *midiOutShortMsg_type)( HMIDIOUT hmo, DWORD dwMsg);
+extern midiOutShortMsg_type midiOutShortMsg_orig;
+typedef MMRESULT (WINAPI *midiOutLongMsg_type)(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
+extern midiOutLongMsg_type midiOutLongMsg_orig;
+typedef MMRESULT (WINAPI *midiOutReset_type)( HMIDIOUT hmo);
+extern midiOutReset_type midiOutReset_orig;
+typedef MMRESULT (WINAPI *midiOutCachePatches_type)( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache);
+extern midiOutCachePatches_type midiOutCachePatches_orig;
+typedef MMRESULT (WINAPI *midiOutCacheDrumPatches_type)( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache);
+extern midiOutCacheDrumPatches_type midiOutCacheDrumPatches_orig;
+typedef MMRESULT (WINAPI *midiOutGetID_type)( HMIDIOUT hmo, LPUINT puDeviceID);
+extern midiOutGetID_type midiOutGetID_orig;
+typedef MMRESULT (WINAPI *midiOutMessage_type)( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
+extern midiOutMessage_type midiOutMessage_orig;
+typedef UINT (WINAPI *midiInGetNumDevs_type)(void);
+extern midiInGetNumDevs_type midiInGetNumDevs_orig;
+typedef MMRESULT (WINAPI *midiInGetDevCapsA_type)( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic);
+extern midiInGetDevCapsA_type midiInGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *midiInGetDevCapsW_type)( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic);
+extern midiInGetDevCapsW_type midiInGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *midiInGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
+extern midiInGetErrorTextA_type midiInGetErrorTextA_orig;
+typedef MMRESULT (WINAPI *midiInGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
+extern midiInGetErrorTextW_type midiInGetErrorTextW_orig;
+typedef MMRESULT (WINAPI *midiInOpen_type)( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
+extern midiInOpen_type midiInOpen_orig;
+typedef MMRESULT (WINAPI *midiInClose_type)( HMIDIIN hmi);
+extern midiInClose_type midiInClose_orig;
+typedef MMRESULT (WINAPI *midiInPrepareHeader_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
+extern midiInPrepareHeader_type midiInPrepareHeader_orig;
+typedef MMRESULT (WINAPI *midiInUnprepareHeader_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
+extern midiInUnprepareHeader_type midiInUnprepareHeader_orig;
+typedef MMRESULT (WINAPI *midiInAddBuffer_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
+extern midiInAddBuffer_type midiInAddBuffer_orig;
+typedef MMRESULT (WINAPI *midiInStart_type)( HMIDIIN hmi);
+extern midiInStart_type midiInStart_orig;
+typedef MMRESULT (WINAPI *midiInStop_type)( HMIDIIN hmi);
+extern midiInStop_type midiInStop_orig;
+typedef MMRESULT (WINAPI *midiInReset_type)( HMIDIIN hmi);
+extern midiInReset_type midiInReset_orig;
+typedef MMRESULT (WINAPI *midiInGetID_type)( HMIDIIN hmi, LPUINT puDeviceID);
+extern midiInGetID_type midiInGetID_orig;
+typedef MMRESULT (WINAPI *midiInMessage_type)( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
+extern midiInMessage_type midiInMessage_orig;
+typedef UINT (WINAPI *auxGetNumDevs_type)(void);
+extern auxGetNumDevs_type auxGetNumDevs_orig;
+typedef MMRESULT (WINAPI *auxGetDevCapsA_type)( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac);
+extern auxGetDevCapsA_type auxGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *auxGetDevCapsW_type)( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac);
+extern auxGetDevCapsW_type auxGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *auxSetVolume_type)( UINT uDeviceID, DWORD dwVolume);
+extern auxSetVolume_type auxSetVolume_orig;
+typedef MMRESULT (WINAPI *auxGetVolume_type)( UINT uDeviceID, LPDWORD pdwVolume);
+extern auxGetVolume_type auxGetVolume_orig;
+typedef MMRESULT (WINAPI *auxOutMessage_type)( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
+extern auxOutMessage_type auxOutMessage_orig;
+typedef UINT (WINAPI *mixerGetNumDevs_type)(void);
+extern mixerGetNumDevs_type mixerGetNumDevs_orig;
+typedef MMRESULT (WINAPI *mixerGetDevCapsA_type)( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps);
+extern mixerGetDevCapsA_type mixerGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *mixerGetDevCapsW_type)( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps);
+extern mixerGetDevCapsW_type mixerGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *mixerOpen_type)( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
+extern mixerOpen_type mixerOpen_orig;
+typedef MMRESULT (WINAPI *mixerClose_type)( HMIXER hmx);
+extern mixerClose_type mixerClose_orig;
+typedef DWORD (WINAPI *mixerMessage_type)( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
+extern mixerMessage_type mixerMessage_orig;
+typedef MMRESULT (WINAPI *mixerGetLineInfoA_type)( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo);
+extern mixerGetLineInfoA_type mixerGetLineInfoA_orig;
+typedef MMRESULT (WINAPI *mixerGetLineInfoW_type)( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo);
+extern mixerGetLineInfoW_type mixerGetLineInfoW_orig;
+typedef MMRESULT (WINAPI *mixerGetID_type)( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId);
+extern mixerGetID_type mixerGetID_orig;
+typedef MMRESULT (WINAPI *mixerGetLineControlsA_type)( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls);
+extern mixerGetLineControlsA_type mixerGetLineControlsA_orig;
+typedef MMRESULT (WINAPI *mixerGetLineControlsW_type)( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls);
+extern mixerGetLineControlsW_type mixerGetLineControlsW_orig;
+typedef MMRESULT (WINAPI *mixerGetControlDetailsA_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
+extern mixerGetControlDetailsA_type mixerGetControlDetailsA_orig;
+typedef MMRESULT (WINAPI *mixerGetControlDetailsW_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
+extern mixerGetControlDetailsW_type mixerGetControlDetailsW_orig;
+typedef MMRESULT (WINAPI *mixerSetControlDetails_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
+extern mixerSetControlDetails_type mixerSetControlDetails_orig;
+typedef DWORD (WINAPI *mmGetCurrentTask_type)(void);
+extern mmGetCurrentTask_type mmGetCurrentTask_orig;
+typedef void (WINAPI *mmTaskBlock_type)(DWORD);
+extern mmTaskBlock_type mmTaskBlock_orig;
+typedef UINT (WINAPI *mmTaskCreate_type)(LPTASKCALLBACK, HANDLE*, DWORD_PTR);
+extern mmTaskCreate_type mmTaskCreate_orig;
+typedef BOOL (WINAPI *mmTaskSignal_type)(DWORD);
+extern mmTaskSignal_type mmTaskSignal_orig;
+typedef VOID (WINAPI *mmTaskYield_type)(VOID);
+extern mmTaskYield_type mmTaskYield_orig;
+typedef MMRESULT (WINAPI *timeGetSystemTime_type)( LPMMTIME pmmt, UINT cbmmt);
+extern timeGetSystemTime_type timeGetSystemTime_orig;
+typedef DWORD (WINAPI *timeGetTime_type)(void);
+extern timeGetTime_type timeGetTime_orig;
+typedef MMRESULT (WINAPI *timeSetEvent_type)( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent);
+extern timeSetEvent_type timeSetEvent_orig;
+typedef MMRESULT (WINAPI *timeKillEvent_type)( UINT uTimerID);
+extern timeKillEvent_type timeKillEvent_orig;
+typedef MMRESULT (WINAPI *timeGetDevCaps_type)( LPTIMECAPS ptc, UINT cbtc);
+extern timeGetDevCaps_type timeGetDevCaps_orig;
+typedef MMRESULT (WINAPI *timeBeginPeriod_type)( UINT uPeriod);
+extern timeBeginPeriod_type timeBeginPeriod_orig;
+typedef MMRESULT (WINAPI *timeEndPeriod_type)( UINT uPeriod);
+extern timeEndPeriod_type timeEndPeriod_orig;
+typedef UINT (WINAPI *joyGetNumDevs_type)(void);
+extern joyGetNumDevs_type joyGetNumDevs_orig;
+typedef MMRESULT (WINAPI *joyConfigChanged_type)(DWORD dwFlags);
+extern joyConfigChanged_type joyConfigChanged_orig;
+typedef MMRESULT (WINAPI *joyGetDevCapsA_type)( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc);
+extern joyGetDevCapsA_type joyGetDevCapsA_orig;
+typedef MMRESULT (WINAPI *joyGetDevCapsW_type)( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc);
+extern joyGetDevCapsW_type joyGetDevCapsW_orig;
+typedef MMRESULT (WINAPI *joyGetPos_type)( UINT uJoyID, LPJOYINFO pji);
+extern joyGetPos_type joyGetPos_orig;
+typedef MMRESULT (WINAPI *joyGetPosEx_type)( UINT uJoyID, LPJOYINFOEX pji);
+extern joyGetPosEx_type joyGetPosEx_orig;
+typedef MMRESULT (WINAPI *joyGetThreshold_type)( UINT uJoyID, LPUINT puThreshold);
+extern joyGetThreshold_type joyGetThreshold_orig;
+typedef MMRESULT (WINAPI *joyReleaseCapture_type)( UINT uJoyID);
+extern joyReleaseCapture_type joyReleaseCapture_orig;
+typedef MMRESULT (WINAPI *joySetCapture_type)( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged);
+extern joySetCapture_type joySetCapture_orig;
+typedef MMRESULT (WINAPI *joySetThreshold_type)( UINT uJoyID, UINT uThreshold);
+extern joySetThreshold_type joySetThreshold_orig;
+typedef BOOL (WINAPI *mciDriverNotify_type)(HWND hwndCallback, UINT uDeviceID, UINT uStatus);
+extern mciDriverNotify_type mciDriverNotify_orig;
+typedef UINT (WINAPI *mciDriverYield_type)(UINT uDeviceID);
+extern mciDriverYield_type mciDriverYield_orig;
+typedef FOURCC (WINAPI *mmioStringToFOURCCA_type)( LPCSTR sz, UINT uFlags);
+extern mmioStringToFOURCCA_type mmioStringToFOURCCA_orig;
+typedef FOURCC (WINAPI *mmioStringToFOURCCW_type)( LPCWSTR sz, UINT uFlags);
+extern mmioStringToFOURCCW_type mmioStringToFOURCCW_orig;
+typedef LPMMIOPROC (WINAPI *mmioInstallIOProcA_type)( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
+extern mmioInstallIOProcA_type mmioInstallIOProcA_orig;
+typedef LPMMIOPROC (WINAPI *mmioInstallIOProcW_type)( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
+extern mmioInstallIOProcW_type mmioInstallIOProcW_orig;
+typedef HMMIO (WINAPI *mmioOpenA_type)( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
+extern mmioOpenA_type mmioOpenA_orig;
+typedef HMMIO (WINAPI *mmioOpenW_type)( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
+extern mmioOpenW_type mmioOpenW_orig;
+typedef MMRESULT (WINAPI *mmioRenameA_type)( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
+extern mmioRenameA_type mmioRenameA_orig;
+typedef MMRESULT (WINAPI *mmioRenameW_type)( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
+extern mmioRenameW_type mmioRenameW_orig;
+typedef MMRESULT (WINAPI *mmioClose_type)( HMMIO hmmio, UINT fuClose);
+extern mmioClose_type mmioClose_orig;
+typedef LONG (WINAPI *mmioRead_type)( HMMIO hmmio, HPSTR pch, LONG cch);
+extern mmioRead_type mmioRead_orig;
+typedef LONG (WINAPI *mmioWrite_type)( HMMIO hmmio, const char _huge* pch, LONG cch);
+extern mmioWrite_type mmioWrite_orig;
+typedef LONG (WINAPI *mmioSeek_type)( HMMIO hmmio, LONG lOffset, int iOrigin);
+extern mmioSeek_type mmioSeek_orig;
+typedef MMRESULT (WINAPI *mmioGetInfo_type)( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo);
+extern mmioGetInfo_type mmioGetInfo_orig;
+typedef MMRESULT (WINAPI *mmioSetInfo_type)( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo);
+extern mmioSetInfo_type mmioSetInfo_orig;
+typedef MMRESULT (WINAPI *mmioSetBuffer_type)( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer);
+extern mmioSetBuffer_type mmioSetBuffer_orig;
+typedef MMRESULT (WINAPI *mmioFlush_type)( HMMIO hmmio, UINT fuFlush);
+extern mmioFlush_type mmioFlush_orig;
+typedef MMRESULT (WINAPI *mmioAdvance_type)( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance);
+extern mmioAdvance_type mmioAdvance_orig;
+typedef LRESULT (WINAPI *mmioSendMessage_type)( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
+extern mmioSendMessage_type mmioSendMessage_orig;
+typedef MMRESULT (WINAPI *mmioDescend_type)( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend);
+extern mmioDescend_type mmioDescend_orig;
+typedef MMRESULT (WINAPI *mmioAscend_type)( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend);
+extern mmioAscend_type mmioAscend_orig;
+typedef MMRESULT (WINAPI *mmioCreateChunk_type)(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate);
+extern mmioCreateChunk_type mmioCreateChunk_orig;
+typedef MCIERROR (WINAPI *mciSendCommandA_type)( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
+extern mciSendCommandA_type mciSendCommandA_orig;
+typedef MCIERROR (WINAPI *mciSendCommandW_type)( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
+extern mciSendCommandW_type mciSendCommandW_orig;
+typedef MCIERROR (WINAPI *mciSendStringA_type)( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
+extern mciSendStringA_type mciSendStringA_orig;
+typedef MCIERROR (WINAPI *mciSendStringW_type)( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
+extern mciSendStringW_type mciSendStringW_orig;
+typedef MCIDEVICEID (WINAPI *mciGetDeviceIDA_type)( LPCSTR pszDevice);
+extern mciGetDeviceIDA_type mciGetDeviceIDA_orig;
+typedef MCIDEVICEID (WINAPI *mciGetDeviceIDW_type)( LPCWSTR pszDevice);
+extern mciGetDeviceIDW_type mciGetDeviceIDW_orig;
+typedef MCIDEVICEID (WINAPI *mciGetDeviceIDFromElementIDA_type)( DWORD dwElementID, LPCSTR lpstrType );
+extern mciGetDeviceIDFromElementIDA_type mciGetDeviceIDFromElementIDA_orig;
+typedef MCIDEVICEID (WINAPI *mciGetDeviceIDFromElementIDW_type)( DWORD dwElementID, LPCWSTR lpstrType );
+extern mciGetDeviceIDFromElementIDW_type mciGetDeviceIDFromElementIDW_orig;
+typedef DWORD_PTR (WINAPI *mciGetDriverData_type)(UINT uDeviceID);
+extern mciGetDriverData_type mciGetDriverData_orig;
+typedef BOOL (WINAPI *mciGetErrorStringA_type)( MCIERROR mcierr, LPSTR pszText, UINT cchText);
+extern mciGetErrorStringA_type mciGetErrorStringA_orig;
+typedef BOOL (WINAPI *mciGetErrorStringW_type)( MCIERROR mcierr, LPWSTR pszText, UINT cchText);
+extern mciGetErrorStringW_type mciGetErrorStringW_orig;
+typedef BOOL (WINAPI *mciSetDriverData_type)(UINT uDeviceID, DWORD_PTR dwData);
+extern mciSetDriverData_type mciSetDriverData_orig;
+typedef BOOL (WINAPI *mciSetYieldProc_type)( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData);
+extern mciSetYieldProc_type mciSetYieldProc_orig;
+typedef BOOL (WINAPI *mciFreeCommandResource_type)(UINT uTable);
+extern mciFreeCommandResource_type mciFreeCommandResource_orig;
+typedef HTASK (WINAPI *mciGetCreatorTask_type)( MCIDEVICEID mciId);
+extern mciGetCreatorTask_type mciGetCreatorTask_orig;
+typedef YIELDPROC (WINAPI *mciGetYieldProc_type)( MCIDEVICEID mciId, LPDWORD pdwYieldData);
+extern mciGetYieldProc_type mciGetYieldProc_orig;
+typedef UINT (WINAPI *mciLoadCommandResource_type)(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType);
+extern mciLoadCommandResource_type mciLoadCommandResource_orig;
+typedef BOOL (WINAPI *mciExecute_type)(LPCSTR pszCommand);
+extern mciExecute_type mciExecute_orig;
diff --git a/indra/media_plugins/winmmshim/winmm.def b/indra/media_plugins/winmmshim/winmm.def
new file mode 100644
index 0000000000..c55a2845f8
--- /dev/null
+++ b/indra/media_plugins/winmmshim/winmm.def
@@ -0,0 +1,218 @@
+;
+; winmm.def
+;
+; Exports for WINMM DLL
+;
+
+LIBRARY WINMM
+EXPORTS
+CloseDriver
+DefDriverProc
+DriverCallback
+DrvGetModuleHandle
+GetDriverModuleHandle
+;MigrateAllDrivers
+;MigrateSoundEvents
+;NotifyCallbackData
+OpenDriver
+;PlaySound
+PlaySoundA
+PlaySoundW
+SendDriverMessage
+;WOW32DriverCallback
+;WOW32ResolveMultiMediaHandle
+;WOWAppExit
+;WinmmLogoff
+;WinmmLogon
+;aux32Message
+auxGetDevCapsA
+auxGetDevCapsW
+auxGetNumDevs
+auxGetVolume
+auxOutMessage
+auxSetVolume
+;gfxAddGfx
+;gfxBatchChange
+;gfxCreateGfxFactoriesList
+;gfxCreateZoneFactoriesList
+;gfxDestroyDeviceInterfaceList
+;gfxEnumerateGfxs
+;gfxLogoff
+;gfxLogon
+;gfxModifyGfx
+;gfxOpenGfx
+;gfxRemoveGfx
+;joy32Message
+joyConfigChanged
+joyGetDevCapsA
+joyGetDevCapsW
+joyGetNumDevs
+joyGetPos
+joyGetPosEx
+joyGetThreshold
+joyReleaseCapture
+joySetCapture
+joySetThreshold
+;mci32Message
+mciDriverNotify
+mciDriverYield
+mciExecute
+mciFreeCommandResource
+mciGetCreatorTask
+mciGetDeviceIDA
+mciGetDeviceIDFromElementIDA
+mciGetDeviceIDFromElementIDW
+mciGetDeviceIDW
+mciGetDriverData
+mciGetErrorStringA
+mciGetErrorStringW
+mciGetYieldProc
+mciLoadCommandResource
+mciSendCommandA
+mciSendCommandW
+mciSendStringA
+mciSendStringW
+mciSetDriverData
+mciSetYieldProc
+;mid32Message
+midiConnect
+midiDisconnect
+midiInAddBuffer
+midiInClose
+midiInGetDevCapsA
+midiInGetDevCapsW
+midiInGetErrorTextA
+midiInGetErrorTextW
+midiInGetID
+midiInGetNumDevs
+midiInMessage
+midiInOpen
+midiInPrepareHeader
+midiInReset
+midiInStart
+midiInStop
+midiInUnprepareHeader
+midiOutCacheDrumPatches
+midiOutCachePatches
+midiOutClose
+midiOutGetDevCapsA
+midiOutGetDevCapsW
+midiOutGetErrorTextA
+midiOutGetErrorTextW
+midiOutGetID
+midiOutGetNumDevs
+midiOutGetVolume
+midiOutLongMsg
+midiOutMessage
+midiOutOpen
+midiOutPrepareHeader
+midiOutReset
+midiOutSetVolume
+midiOutShortMsg
+midiOutUnprepareHeader
+midiStreamClose
+midiStreamOpen
+midiStreamOut
+midiStreamPause
+midiStreamPosition
+midiStreamProperty
+midiStreamRestart
+midiStreamStop
+mixerClose
+mixerGetControlDetailsA
+mixerGetControlDetailsW
+mixerGetDevCapsA
+mixerGetDevCapsW
+mixerGetID
+mixerGetLineControlsA
+mixerGetLineControlsW
+mixerGetLineInfoA
+mixerGetLineInfoW
+mixerGetNumDevs
+mixerMessage
+mixerOpen
+mixerSetControlDetails
+;mmDrvInstall
+mmGetCurrentTask
+mmTaskBlock
+mmTaskCreate
+mmTaskSignal
+mmTaskYield
+mmioAdvance
+mmioAscend
+mmioClose
+mmioCreateChunk
+mmioDescend
+mmioFlush
+mmioGetInfo
+mmioInstallIOProcA
+mmioInstallIOProcW
+mmioOpenA
+mmioOpenW
+mmioRead
+mmioRenameA
+mmioRenameW
+mmioSeek
+mmioSendMessage
+mmioSetBuffer
+mmioSetInfo
+mmioStringToFOURCCA
+mmioStringToFOURCCW
+mmioWrite
+mmsystemGetVersion
+;mod32Message
+;mxd32Message
+sndPlaySoundA
+sndPlaySoundW
+;tid32Message
+timeBeginPeriod
+timeEndPeriod
+timeGetDevCaps
+timeGetSystemTime
+timeGetTime
+timeKillEvent
+timeSetEvent
+waveInAddBuffer
+waveInClose
+waveInGetDevCapsA
+waveInGetDevCapsW
+waveInGetErrorTextA
+waveInGetErrorTextW
+waveInGetID
+waveInGetNumDevs
+waveInGetPosition
+waveInMessage
+waveInOpen
+waveInPrepareHeader
+waveInReset
+waveInStart
+waveInStop
+waveInUnprepareHeader
+waveOutBreakLoop
+waveOutClose
+waveOutGetDevCapsA
+waveOutGetDevCapsW
+waveOutGetErrorTextA
+waveOutGetErrorTextW
+waveOutGetID
+waveOutGetNumDevs
+waveOutGetPitch
+waveOutGetPlaybackRate
+waveOutGetPosition
+waveOutGetVolume
+waveOutMessage
+waveOutOpen
+waveOutPause
+waveOutPrepareHeader
+waveOutReset
+waveOutRestart
+waveOutSetPitch
+waveOutSetPlaybackRate
+waveOutSetVolume
+waveOutUnprepareHeader
+waveOutWrite
+;wid32Message
+;winmmSetDebugLevel
+;wod32Message
+setPluginVolume
+setPluginMute \ No newline at end of file
diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp
new file mode 100644
index 0000000000..f7df3b19a0
--- /dev/null
+++ b/indra/media_plugins/winmmshim/winmm_shim.cpp
@@ -0,0 +1,192 @@
+/**
+ * @file winmmshim.cpp
+ * @brief controls volume level of process by intercepting calls to winmm.dll
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+#include "forwarding_api.h"
+#include <xmmintrin.h>
+#include <map>
+#include <math.h>
+
+using std::wstring;
+
+static float sVolumeLevel = 1.f;
+static bool sMute = false;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ static bool initialized = false;
+ // do this only once
+ if (!initialized)
+ { // bind to original winmm.dll
+ TCHAR system_path[MAX_PATH];
+ TCHAR dll_path[MAX_PATH];
+ ::GetSystemDirectory(system_path, MAX_PATH);
+
+ // grab winmm.dll from system path, where it should live
+ wsprintf(dll_path, "%s\\winmm.dll", system_path);
+ HMODULE winmm_handle = ::LoadLibrary(dll_path);
+
+ if (winmm_handle != NULL)
+ { // we have a dll, let's get out pointers!
+ initialized = true;
+ init_function_pointers(winmm_handle);
+ return true;
+ }
+
+ // failed to initialize real winmm.dll
+ return false;
+ }
+ return true;
+}
+
+
+extern "C"
+{
+ // tracks the requested format for a given waveout buffer
+ struct WaveOutFormat
+ {
+ WaveOutFormat(int bits_per_sample)
+ : mBitsPerSample(bits_per_sample)
+ {}
+ int mBitsPerSample;
+ };
+ typedef std::map<HWAVEOUT, WaveOutFormat*> wave_out_map_t;
+ static wave_out_map_t sWaveOuts;
+
+ MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
+ {
+ if (pwfx->wFormatTag != WAVE_FORMAT_PCM
+ || (pwfx->wBitsPerSample != 8 && pwfx->wBitsPerSample != 16))
+ { // uncompressed 8 and 16 bit sound are the only types we support
+ return WAVERR_BADFORMAT;
+ }
+
+ MMRESULT result = waveOutOpen_orig(phwo, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen);
+ if (result == MMSYSERR_NOERROR
+ && ((fdwOpen & WAVE_FORMAT_QUERY) == 0)) // not just querying for format support
+ { // remember the requested bits per sample, and associate with the given handle
+ WaveOutFormat* wave_outp = new WaveOutFormat(pwfx->wBitsPerSample);
+ sWaveOuts.insert(std::make_pair(*phwo, wave_outp));
+ }
+ return result;
+ }
+
+ MMRESULT WINAPI waveOutClose( HWAVEOUT hwo)
+ {
+ wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
+ if (found_it != sWaveOuts.end())
+ { // forget what we know about this handle
+ delete found_it->second;
+ sWaveOuts.erase(found_it);
+ }
+ return waveOutClose_orig( hwo);
+ }
+
+ MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
+ {
+ MMRESULT result = MMSYSERR_NOERROR;
+
+ if (sMute)
+ { // zero out the audio buffer when muted
+ memset(pwh->lpData, 0, pwh->dwBufferLength);
+ }
+ else
+ {
+ wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
+ if (found_it != sWaveOuts.end())
+ {
+ WaveOutFormat* formatp = found_it->second;
+ switch (formatp->mBitsPerSample){
+ case 8:
+ {
+ char volume = (char)(sVolumeLevel * 127.f);
+ for (unsigned int i = 0; i < pwh->dwBufferLength; i++)
+ {
+ // unsigned multiply doesn't use most significant bit, so shift by 7 bits
+ // to get resulting value back into 8 bits
+ pwh->lpData[i] = (pwh->lpData[i] * volume) >> 7;
+ }
+ break;
+ }
+ case 16:
+ {
+ short volume_16 = (short)(sVolumeLevel * 32767.f);
+
+ // copy volume level 4 times into 64 bit MMX register
+ __m64 volume_64 = _mm_set_pi16(volume_16, volume_16, volume_16, volume_16);
+ __m64 *sample_64;
+ // for everything that can be addressed in 64 bit multiples...
+ for (sample_64 = (__m64*)pwh->lpData;
+ sample_64 < (__m64*)(pwh->lpData + pwh->dwBufferLength);
+ ++sample_64)
+ {
+ //...multiply the samples by the volume...
+ __m64 scaled_sample = _mm_mulhi_pi16(*sample_64, volume_64);
+ // ...and shift left 1 bit since an unsigned multiple loses the most significant bit
+ // 0x7FFF * 0x7FFF = 0x3fff0001
+ // 0x3fff0001 << 1 = 0x7ffe0002
+ // notice that the LSB is always 0...should consider dithering
+ *sample_64 = _mm_slli_pi16(scaled_sample, 1);
+ }
+
+ // the captain has turned off the MMX sign, you are now free to use floating point registers
+ _mm_empty();
+
+ for (short* sample_16 = (short*)sample_64;
+ sample_16 < (short*)(pwh->lpData + pwh->dwBufferLength);
+ ++sample_16)
+ { // finish remaining samples that didn't fit into 64 bit register
+ *sample_16 = (*sample_16 * volume_16) >> 15;
+ }
+
+ break;
+ }
+ default:
+ // don't do anything
+ break;
+ }
+ }
+ }
+ return waveOutWrite_orig( hwo, pwh, cbwh);
+ }
+
+ void WINAPI setPluginVolume(float volume)
+ {
+ sVolumeLevel = volume;
+ }
+
+ void WINAPI setPluginMute(bool mute)
+ {
+ sMute = mute;
+ }
+}
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 99ba356d9e..835a9aacd5 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -104,6 +104,7 @@ set(viewer_SOURCE_FILES
llclassifiedinfo.cpp
llclassifiedstatsresponder.cpp
llcloud.cpp
+ llcofwearables.cpp
llcolorswatch.cpp
llcommanddispatcherlistener.cpp
llcommandhandler.cpp
@@ -614,6 +615,7 @@ set(viewer_HEADER_FILES
llclassifiedinfo.h
llclassifiedstatsresponder.h
llcloud.h
+ llcofwearables.h
llcolorswatch.h
llcommanddispatcherlistener.h
llcommandhandler.h
@@ -1457,8 +1459,6 @@ if (WINDOWS)
${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll
${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll
- ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_quicktime.dll
- ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_webkit.dll
${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll
${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll
${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll
@@ -1498,6 +1498,7 @@ if (WINDOWS)
SLPlugin
media_plugin_quicktime
media_plugin_webkit
+ winmm_shim
windows-crash-logger
windows-updater
)
@@ -1538,8 +1539,6 @@ if (WINDOWS)
add_dependencies(${VIEWER_BINARY_NAME}
SLPlugin
- media_plugin_quicktime
- media_plugin_webkit
windows-updater
windows-crash-logger
)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 63e8775d04..e763f9cebc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11005,5 +11005,16 @@
<integer>2048</integer>
</map>
<!-- End of back compatibility settings -->
+ <key>teleport_offer_invitation_max_length</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum length of teleport offer invitation line editor. 254 - max_location_url_length(76) = 178</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>178</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 8bcf680876..ddcaeb113d 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1226,7 +1226,10 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s
if ( distance > 1.f && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
{
setFlying(TRUE);
- mAutoPilotFlyOnStop = TRUE;
+ // Do not force flying for "Sit" behavior to prevent flying after pressing "Stand"
+ // from an object. See EXT-1655.
+ if ("Sit" != mAutoPilotBehaviorName)
+ mAutoPilotFlyOnStop = TRUE;
}
mAutoPilot = TRUE;
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 466f2d499d..8a880e5ace 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -2031,6 +2031,39 @@ void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake)
}
}
+bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool closer_to_body)
+{
+ if (!item) return false;
+ if (!item->isWearableType()) return false;
+
+ wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(item->getWearableType());
+ if (wearable_iter == mWearableDatas.end()) return false;
+
+ wearableentry_vec_t& wearable_vec = wearable_iter->second;
+ if (wearable_vec.empty()) return false;
+
+ const LLUUID& asset_id = item->getAssetUUID();
+
+ //nowhere to move if the wearable is already on any boundary (closest to the body/furthest from the body)
+ if (closer_to_body && asset_id == wearable_vec.front()->getAssetID()) return false;
+ if (!closer_to_body && asset_id == wearable_vec.back()->getAssetID()) return false;
+
+ for (U32 i = 0; i < wearable_vec.size(); ++i)
+ {
+ LLWearable* wearable = wearable_vec[i];
+ if (!wearable) continue;
+ if (wearable->getAssetID() != asset_id) continue;
+
+ //swapping wearables
+ U32 swap_i = closer_to_body ? i-1 : i+1;
+ wearable_vec[i] = wearable_vec[swap_i];
+ wearable_vec[swap_i] = wearable;
+ return true;
+ }
+
+ return false;
+}
+
void LLAgentWearables::updateServer()
{
sendAgentWearablesUpdate();
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 585fd3f8b3..d3b18f68f1 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -82,6 +82,8 @@ public:
void animateAllWearableParams(F32 delta, BOOL upload_bake);
+ bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body);
+
//--------------------------------------------------------------------
// Accessors
//--------------------------------------------------------------------
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 9e02886e4f..5586b3cd4d 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -122,6 +122,38 @@ private:
bool mAppend;
};
+
+//Inventory callback updating "dirty" state when destroyed
+class LLUpdateDirtyState: public LLInventoryCallback
+{
+public:
+ LLUpdateDirtyState() {}
+ virtual ~LLUpdateDirtyState(){ LLAppearanceMgr::getInstance()->updateIsDirty(); }
+ virtual void fire(const LLUUID&) {}
+};
+
+
+//Inventory collect functor collecting wearables of a specific wearable type
+class LLFindClothesOfType : public LLInventoryCollectFunctor
+{
+public:
+ LLFindClothesOfType(EWearableType type) : mWearableType(type) {}
+ virtual ~LLFindClothesOfType() {}
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (!item) return false;
+ if (item->getType() != LLAssetType::AT_CLOTHING) return false;
+
+ LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
+ if (!vitem || vitem->getWearableType() != mWearableType) return false;
+
+ return true;
+ }
+
+ const EWearableType mWearableType;
+};
+
+
LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy():
mFireCount(0)
{
@@ -1027,6 +1059,10 @@ bool sort_by_description(const LLInventoryItem* item1, const LLInventoryItem* it
void LLAppearanceMgr::updateAppearanceFromCOF()
{
+ //checking integrity of the COF in terms of ordering of wearables,
+ //checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
+ updateClothingOrderingInfo();
+
// update dirty flag to see if the state of the COF matches
// the saved outfit stored as a folder link
llinfos << "starting" << llendl;
@@ -1035,8 +1071,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF()
dumpCat(getCOF(),"COF, start");
- updateClothingOrderingInfo();
-
bool follow_folder_links = true;
LLUUID current_outfit_id = getCOF();
@@ -1491,6 +1525,17 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, bool do_update)
}
}
+bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInventoryItem* item2)
+{
+ if (!item1 || !item2)
+ {
+ llwarning("item1, item2 cannot be null, something is very wrong", 0);
+ return true;
+ }
+
+ return item1->getLinkedUUID() < item2->getLinkedUUID();
+}
+
void LLAppearanceMgr::updateIsDirty()
{
LLUUID cof = getCOF();
@@ -1530,33 +1575,37 @@ void LLAppearanceMgr::updateIsDirty()
// Current outfit folder should have one more item than the outfit folder.
// this one item is the link back to the outfit folder itself.
mOutfitIsDirty = true;
+ return;
}
- else
- {
- typedef std::set<LLUUID> item_set_t;
- item_set_t cof_set;
- item_set_t outfit_set;
- // sort COF items by UUID
- for (S32 i = 0; i < cof_items.count(); ++i)
+ //getting rid of base outfit folder link to simplify comparison
+ for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it)
+ {
+ if (*it == base_outfit_item)
{
- LLViewerInventoryItem *item = cof_items.get(i);
- // don't add the base outfit link to the list of objects we're comparing
- if(item != base_outfit_item)
- {
- cof_set.insert(item->getLinkedUUID());
- }
+ cof_items.erase(it);
+ break;
}
+ }
+
+ //"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions)
+ std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid);
+ std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid);
+
+ for (U32 i = 0; i < cof_items.size(); ++i)
+ {
+ LLViewerInventoryItem *item1 = cof_items.get(i);
+ LLViewerInventoryItem *item2 = outfit_items.get(i);
- // sort outfit folder by UUID
- for (S32 i = 0; i < outfit_items.count(); ++i)
+ if (item1->getLinkedUUID() != item2->getLinkedUUID() ||
+ item1->LLInventoryItem::getDescription() != item2->LLInventoryItem::getDescription())
{
- LLViewerInventoryItem *item = outfit_items.get(i);
- outfit_set.insert(item->getLinkedUUID());
+ mOutfitIsDirty = true;
+ return;
}
-
- mOutfitIsDirty = (outfit_set != cof_set);
}
+
+ mOutfitIsDirty = false;
}
}
@@ -1593,8 +1642,11 @@ bool LLAppearanceMgr::updateBaseOutfit()
// in a Base Outfit we do not remove items, only links
purgeCategory(base_outfit_id, false);
+
+ LLPointer<LLInventoryCallback> dirty_state_updater = new LLUpdateDirtyState();
+
//COF contains only links so we copy to the Base Outfit only links
- shallowCopyCategoryContents(getCOF(), base_outfit_id, NULL);
+ shallowCopyCategoryContents(getCOF(), base_outfit_id, dirty_state_updater);
return true;
}
@@ -1802,6 +1854,63 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
}
}
+
+bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_body)
+{
+ if (!item || !item->isWearableType()) return false;
+ if (item->getType() != LLAssetType::AT_CLOTHING) return false;
+ if (!gInventory.isObjectDescendentOf(item->getUUID(), getCOF())) return false;
+
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindClothesOfType filter_wearables_of_type(item->getWearableType());
+ gInventory.collectDescendentsIf(getCOF(), cats, items, true, filter_wearables_of_type);
+ if (items.empty()) return false;
+
+ //*TODO all items are not guarantied to have valid descriptions (check?)
+ std::sort(items.begin(), items.end(), WearablesOrderComparator(item->getWearableType()));
+
+ if (closer_to_body && items.front() == item) return false;
+ if (!closer_to_body && items.back() == item) return false;
+
+ LLInventoryModel::item_array_t::iterator it = std::find(items.begin(), items.end(), item);
+ if (items.end() == it) return false;
+
+
+ //swapping descriptions
+ closer_to_body ? --it : ++it;
+ LLViewerInventoryItem* swap_item = *it;
+ if (!swap_item) return false;
+ std::string tmp = swap_item->LLInventoryItem::getDescription();
+ swap_item->setDescription(item->LLInventoryItem::getDescription());
+ item->setDescription(tmp);
+
+
+ //items need to be updated on a dataserver
+ item->setComplete(TRUE);
+ item->updateServer(FALSE);
+ gInventory.updateItem(item);
+
+ swap_item->setComplete(TRUE);
+ swap_item->updateServer(FALSE);
+ gInventory.updateItem(swap_item);
+
+ //to cause appearance of the agent to be updated
+ bool result = false;
+ if (result = gAgentWearables.moveWearable(item, closer_to_body))
+ {
+ gAgentAvatarp->wearableUpdated(item->getWearableType(), TRUE);
+ }
+
+ setOutfitDirty(true);
+
+ //*TODO do we need to notify observers here in such a way?
+ gInventory.notifyObservers();
+
+ return result;
+}
+
+
//#define DUMP_CAT_VERBOSE
void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index efb5274c5b..a308a3efa9 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -141,6 +141,8 @@ public:
LLUUID makeNewOutfitLinks(const std::string& new_folder_name);
+ bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body);
+
protected:
LLAppearanceMgr();
~LLAppearanceMgr();
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 8ba47b5198..fd0b20281b 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -34,6 +34,7 @@
// common
#include "lltrans.h"
+#include "llcommonutils.h"
#include "llavatarlist.h"
#include "llagentdata.h" // for comparator
@@ -404,7 +405,6 @@ void LLAvatarList::computeDifference(
uuid_vec_t& vremoved)
{
uuid_vec_t vcur;
- uuid_vec_t vnew = vnew_unsorted;
// Convert LLSDs to LLUUIDs.
{
@@ -415,21 +415,7 @@ void LLAvatarList::computeDifference(
vcur.push_back(vcur_values[i].asUUID());
}
- std::sort(vcur.begin(), vcur.end());
- std::sort(vnew.begin(), vnew.end());
-
- uuid_vec_t::iterator it;
- size_t maxsize = llmax(vcur.size(), vnew.size());
- vadded.resize(maxsize);
- vremoved.resize(maxsize);
-
- // what to remove
- it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin());
- vremoved.erase(it, vremoved.end());
-
- // what to add
- it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin());
- vadded.erase(it, vadded.end());
+ LLCommonUtils::computeDifference(vnew_unsorted, vcur, vadded, vremoved);
}
// Refresh shown time of our last interaction with all listed avatars.
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 489c66be71..9d421b4f0b 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -921,6 +921,9 @@ protected:
class LLNotificationChiclet : public LLSysWellChiclet
{
friend class LLUICtrlFactory;
+public:
+ struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
+
protected:
LLNotificationChiclet(const Params& p);
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
new file mode 100644
index 0000000000..f0442ee3f6
--- /dev/null
+++ b/indra/newview/llcofwearables.cpp
@@ -0,0 +1,153 @@
+/**
+ * @file llcofwearables.cpp
+ * @brief LLCOFWearables displayes wearables from the current outfit split into three lists (attachments, clothing and body parts)
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcofwearables.h"
+
+#include "llappearancemgr.h"
+#include "llinventory.h"
+#include "llinventoryitemslist.h"
+#include "llinventoryfunctions.h"
+
+static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables");
+
+const LLSD REARRANGE = LLSD().with("rearrange", LLSD());
+
+
+LLCOFWearables::LLCOFWearables() : LLPanel(),
+ mAttachments(NULL),
+ mClothing(NULL),
+ mBodyParts(NULL),
+ mLastSelectedList(NULL)
+{
+};
+
+
+// virtual
+BOOL LLCOFWearables::postBuild()
+{
+ mAttachments = getChild<LLFlatListView>("list_attachments");
+ mClothing = getChild<LLFlatListView>("list_clothing");
+ mBodyParts = getChild<LLFlatListView>("list_body_parts");
+
+
+ //selection across different list/tabs is not supported
+ mAttachments->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mAttachments));
+ mClothing->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mClothing));
+ mBodyParts->setCommitCallback(boost::bind(&LLCOFWearables::onSelectionChange, this, mBodyParts));
+
+ mAttachments->setCommitOnSelectionChange(true);
+ mClothing->setCommitOnSelectionChange(true);
+ mBodyParts->setCommitOnSelectionChange(true);
+
+ return LLPanel::postBuild();
+}
+
+void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list)
+{
+ if (!selected_list) return;
+
+ if (selected_list != mLastSelectedList)
+ {
+ if (selected_list != mAttachments) mAttachments->resetSelection(true);
+ if (selected_list != mClothing) mClothing->resetSelection(true);
+ if (selected_list != mBodyParts) mBodyParts->resetSelection(true);
+
+ mLastSelectedList = selected_list;
+ }
+
+ onCommit();
+}
+
+void LLCOFWearables::refresh()
+{
+ clear();
+
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+
+ gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, items, LLInventoryModel::EXCLUDE_TRASH);
+ if (items.empty()) return;
+
+ for (U32 i = 0; i < items.size(); ++i)
+ {
+ LLViewerInventoryItem* item = items.get(i);
+ if (!item) continue;
+
+ LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item);
+ if (!item_panel) continue;
+
+ switch (item->getType())
+ {
+ case LLAssetType::AT_OBJECT:
+ mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
+ break;
+
+ case LLAssetType::AT_BODYPART:
+ mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
+ break;
+
+ case LLAssetType::AT_CLOTHING:
+ mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
+ break;
+
+ default: break;
+ }
+ }
+
+ mAttachments->sort(); //*TODO by Name
+ mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
+
+ mClothing->sort(); //*TODO by actual inventory item description
+ mClothing->notify(REARRANGE);
+
+ mBodyParts->sort(); //*TODO by name
+ mBodyParts->notify(REARRANGE);
+}
+
+
+LLUUID LLCOFWearables::getSelectedUUID()
+{
+ if (!mLastSelectedList) return LLUUID::null;
+
+ return mLastSelectedList->getSelectedUUID();
+}
+
+void LLCOFWearables::clear()
+{
+ mAttachments->clear();
+ mClothing->clear();
+ mBodyParts->clear();
+}
+
+//EOF
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
new file mode 100644
index 0000000000..58d67ed32f
--- /dev/null
+++ b/indra/newview/llcofwearables.h
@@ -0,0 +1,66 @@
+/**
+ * @file llcofwearables.h
+ * @brief LLCOFWearables displayes wearables from the current outfit split into three lists (attachments, clothing and body parts)
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLCOFWEARABLES_H
+#define LL_LLCOFWEARABLES_H
+
+#include "llpanel.h"
+
+class LLFlatListView;
+
+class LLCOFWearables : public LLPanel
+{
+public:
+ LLCOFWearables();
+ virtual ~LLCOFWearables() {};
+
+ /*virtual*/ BOOL postBuild();
+
+ LLUUID getSelectedUUID();
+
+ void refresh();
+ void clear();
+
+protected:
+
+ void onSelectionChange(LLFlatListView* selected_list);
+
+ LLFlatListView* mAttachments;
+ LLFlatListView* mClothing;
+ LLFlatListView* mBodyParts;
+
+ LLFlatListView* mLastSelectedList;
+
+};
+
+
+#endif
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index d37bc01885..76a61db5fd 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -54,6 +54,7 @@
#include "llstatusbar.h"
#include "lltextbox.h"
#include "lltexturectrl.h"
+#include "lltrans.h"
#include "llviewchildren.h"
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
@@ -1172,13 +1173,13 @@ void LLFloaterBuyLandUI::refreshUI()
if (!mParcelValid)
{
- message += getString("no_parcel_selected");
+ message += LLTrans::getString("sentences_separator") + getString("no_parcel_selected");
}
else if (mParcelBillableArea == mParcelActualArea)
{
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea);
- message += getString("parcel_meters", string_args);
+ message += LLTrans::getString("sentences_separator") + getString("parcel_meters", string_args);
}
else
{
@@ -1187,13 +1188,13 @@ void LLFloaterBuyLandUI::refreshUI()
{
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea);
- message += getString("premium_land", string_args);
+ message += LLTrans::getString("sentences_separator") + getString("premium_land", string_args);
}
else
{
LLStringUtil::format_map_t string_args;
string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea);
- message += getString("discounted_land", string_args);
+ message += LLTrans::getString("sentences_separator") + getString("discounted_land", string_args);
}
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 909878207c..f03026715d 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1767,6 +1767,8 @@ void LLOutgoingCallDialog::show(const LLSD& key)
getChild<LLTextBox>("leaving")->setVisible(true);
}
break;
+ // STATE_READY is here to show appropriate text for ad-hoc and group calls when floater is shown(EXT-6893)
+ case LLVoiceChannel::STATE_READY :
case LLVoiceChannel::STATE_RINGING :
if(show_oldchannel)
{
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 9f54b86607..dca130c672 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -2,6 +2,10 @@
* @file llinventoryitemslist.cpp
* @brief A list of inventory items represented by LLFlatListView.
*
+ * Class LLInventoryItemsList implements a flat list of inventory items.
+ * Class LLPanelInventoryListItem displays inventory item as an element
+ * of LLInventoryItemsList.
+ *
* $LicenseInfo:firstyear=2010&license=viewergpl$
*
* Copyright (c) 2010, Linden Research, Inc.
@@ -39,33 +43,31 @@
#include "lliconctrl.h"
#include "llinventoryfunctions.h"
+#include "llinventorymodel.h"
#include "lltextutil.h"
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-LLPanelInventoryItem::LLPanelInventoryItem(LLAssetType::EType asset_type,
- LLInventoryType::EType inventory_type,
- U32 wearable_type,
- const std::string &item_name,
- const std::string &hl)
-: LLPanel()
- ,mItemName(item_name)
- ,mHighlightedText(hl)
- ,mIcon(NULL)
- ,mTitle(NULL)
+// static
+LLPanelInventoryListItem* LLPanelInventoryListItem::createItemPanel(const LLViewerInventoryItem* item)
{
- mItemIcon = get_item_icon(asset_type, inventory_type, wearable_type, FALSE);
-
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
+ if (item)
+ {
+ return new LLPanelInventoryListItem(item);
+ }
+ else
+ {
+ return NULL;
+ }
}
-LLPanelInventoryItem::~LLPanelInventoryItem()
+LLPanelInventoryListItem::~LLPanelInventoryListItem()
{}
//virtual
-BOOL LLPanelInventoryItem::postBuild()
+BOOL LLPanelInventoryListItem::postBuild()
{
mIcon = getChild<LLIconCtrl>("item_icon");
mTitle = getChild<LLTextBox>("item_name");
@@ -76,14 +78,14 @@ BOOL LLPanelInventoryItem::postBuild()
}
//virtual
-void LLPanelInventoryItem::setValue(const LLSD& value)
+void LLPanelInventoryListItem::setValue(const LLSD& value)
{
if (!value.isMap()) return;
if (!value.has("selected")) return;
childSetVisible("selected_icon", value["selected"]);
}
-void LLPanelInventoryItem::updateItem()
+void LLPanelInventoryListItem::updateItem()
{
if (mItemIcon.notNull())
mIcon->setImage(mItemIcon);
@@ -95,28 +97,47 @@ void LLPanelInventoryItem::updateItem()
mHighlightedText);
}
-void LLPanelInventoryItem::onMouseEnter(S32 x, S32 y, MASK mask)
+void LLPanelInventoryListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
childSetVisible("hovered_icon", true);
LLPanel::onMouseEnter(x, y, mask);
}
-void LLPanelInventoryItem::onMouseLeave(S32 x, S32 y, MASK mask)
+void LLPanelInventoryListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
childSetVisible("hovered_icon", false);
LLPanel::onMouseLeave(x, y, mask);
}
+LLPanelInventoryListItem::LLPanelInventoryListItem(const LLViewerInventoryItem* item)
+: LLPanel()
+ ,mIcon(NULL)
+ ,mTitle(NULL)
+{
+ mItemName = item->getName();
+ mItemIcon = get_item_icon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
+
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
+}
+
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-LLInventoryItemsList::LLInventoryItemsList(const LLFlatListView::Params& p)
+LLInventoryItemsList::Params::Params()
+{}
+
+LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p)
: LLFlatListView(p)
, mNeedsRefresh(false)
-{}
+{
+ // TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView
+ // but reset to true in all derived classes. This settings might need to
+ // be added to LLFlatListView::Params() and/or set to "true" by default.
+ setCommitOnSelectionChange(true);
+}
// virtual
LLInventoryItemsList::~LLInventoryItemsList()
@@ -196,10 +217,15 @@ void LLInventoryItemsList::computeDifference(
void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item)
{
- llassert(item);
+ if (!item)
+ {
+ llwarns << "No inventory item. Couldn't create flat list item." << llendl;
+ llassert(!"No inventory item. Couldn't create flat list item.");
+ }
- LLPanelInventoryItem *list_item = new LLPanelInventoryItem(item->getType(),
- item->getInventoryType(), item->getFlags(), item->getName(), LLStringUtil::null);
+ LLPanelInventoryListItem *list_item = LLPanelInventoryListItem::createItemPanel(item);
+ if (!list_item)
+ return;
if (!addItem(list_item, item->getUUID()))
{
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 0ca4146867..b496f4b9e9 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -2,6 +2,10 @@
* @file llinventoryitemslist.h
* @brief A list of inventory items represented by LLFlatListView.
*
+ * Class LLInventoryItemsList implements a flat list of inventory items.
+ * Class LLPanelInventoryListItem displays inventory item as an element
+ * of LLInventoryItemsList.
+ *
* $LicenseInfo:firstyear=2010&license=viewergpl$
*
* Copyright (c) 2010, Linden Research, Inc.
@@ -32,28 +36,23 @@
#ifndef LL_LLINVENTORYITEMSLIST_H
#define LL_LLINVENTORYITEMSLIST_H
-#include "llpanel.h"
-
-#include "llassettype.h"
+#include "lldarray.h"
-#include "llinventorytype.h"
+#include "llpanel.h"
// newview
#include "llflatlistview.h"
-#include "llinventorymodel.h"
class LLIconCtrl;
class LLTextBox;
+class LLViewerInventoryItem;
-class LLPanelInventoryItem : public LLPanel
+class LLPanelInventoryListItem : public LLPanel
{
public:
- LLPanelInventoryItem(LLAssetType::EType asset_type,
- LLInventoryType::EType inventory_type,
- U32 wearable_type,
- const std::string &item_name,
- const std::string &hl);
- virtual ~LLPanelInventoryItem();
+ static LLPanelInventoryListItem* createItemPanel(const LLViewerInventoryItem* item);
+
+ virtual ~LLPanelInventoryListItem();
/*virtual*/ BOOL postBuild();
/*virtual*/ void setValue(const LLSD& value);
@@ -63,6 +62,9 @@ public:
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
+protected:
+ LLPanelInventoryListItem(const LLViewerInventoryItem* item);
+
private:
LLIconCtrl* mIcon;
LLTextBox* mTitle;
@@ -72,13 +74,17 @@ private:
std::string mHighlightedText;
};
-
class LLInventoryItemsList : public LLFlatListView
{
public:
+ struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
+ {
+ Params();
+ };
+
virtual ~LLInventoryItemsList();
- void refreshList(const LLInventoryModel::item_array_t item_array);
+ void refreshList(const LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array);
/**
* Let list know items need to be refreshed in next draw()
@@ -91,7 +97,7 @@ public:
protected:
friend class LLUICtrlFactory;
- LLInventoryItemsList(const LLFlatListView::Params& p);
+ LLInventoryItemsList(const LLInventoryItemsList::Params& p);
uuid_vec_t& getIDs() { return mIDs; }
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 03006243f9..214b5d317a 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -658,11 +658,13 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
for (category_map_t::iterator iter = mCategoryMap.begin();
iter != mCategoryMap.end();
- iter++)
+ ++iter)
{
- // Inventory category version is used to find out if some changes
- // to a category have been made.
- S32 version = gInventory.getCategory((*iter).first)->getVersion();
+ LLViewerInventoryCategory* category = gInventory.getCategory((*iter).first);
+ if (!category)
+ continue;
+
+ S32 version = category->getVersion();
if (version != (*iter).second.mVersion)
{
// Update category version in map.
@@ -674,11 +676,27 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
void LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
{
- S32 version = gInventory.getCategory(cat_id)->getVersion();
+ S32 version;
+ LLViewerInventoryCategory* category = gInventory.getCategory(cat_id);
+ if (category)
+ {
+ // Inventory category version is used to find out if some changes
+ // to a category have been made.
+ version = category->getVersion();
+ }
+ else
+ {
+ // If category could not be retrieved it might mean that
+ // inventory is unusable at the moment so the category is
+ // stored with VERSION_UNKNOWN and it may be updated later.
+ version = LLViewerInventoryCategory::VERSION_UNKNOWN;
+ }
+
+ version = category->getVersion();
mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version)));
}
void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id)
{
- mCategoryMap.erase(mCategoryMap.find(cat_id));
+ mCategoryMap.erase(cat_id);
}
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index e11df06d86..0341f2c693 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -375,7 +375,6 @@ void LLNavigationBar::draw()
if(mPurgeTPHistoryItems)
{
LLTeleportHistory::getInstance()->purgeItems();
- onTeleportHistoryChanged();
mPurgeTPHistoryItems = false;
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index ad42d80467..1215272685 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -33,6 +33,12 @@
#include "lloutfitslist.h"
+// llcommon
+#include "llcommonutils.h"
+
+// llcommon
+#include "llcommonutils.h"
+
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llinventoryfunctions.h"
@@ -45,7 +51,12 @@ LLOutfitsList::LLOutfitsList()
: LLPanel()
, mAccordion(NULL)
, mListCommands(NULL)
-{}
+{
+ mCategoriesObserver = new LLInventoryCategoriesObserver();
+ gInventory.addObserver(mCategoriesObserver);
+
+ gInventory.addObserver(this);
+}
LLOutfitsList::~LLOutfitsList()
{
@@ -65,11 +76,6 @@ BOOL LLOutfitsList::postBuild()
{
mAccordion = getChild<LLAccordionCtrl>("outfits_accordion");
- mCategoriesObserver = new LLInventoryCategoriesObserver();
- gInventory.addObserver(mCategoriesObserver);
-
- gInventory.addObserver(this);
-
return TRUE;
}
@@ -79,15 +85,15 @@ void LLOutfitsList::changed(U32 mask)
if (!gInventory.isInventoryUsable())
return;
- // Start observing changes in "My Outfits" category.
const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- mCategoriesObserver->addCategory(outfits,
- boost::bind(&LLOutfitsList::refreshList, this, outfits));
-
LLViewerInventoryCategory* category = gInventory.getCategory(outfits);
if (!category)
return;
+ // Start observing changes in "My Outfits" category.
+ mCategoriesObserver->addCategory(outfits,
+ boost::bind(&LLOutfitsList::refreshList, this, outfits));
+
// Fetch "My Outfits" contents and refresh the list to display
// initially fetched items. If not all items are fetched now
// the observer will refresh the list as soon as the new items
@@ -116,50 +122,16 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
LLInventoryModel::EXCLUDE_TRASH,
is_category);
- uuid_vec_t vnew;
-
- // Creating a vector of newly collected sub-categories UUIDs.
- for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin();
- iter != cat_array.end();
- iter++)
- {
- vnew.push_back((*iter)->getUUID());
- }
-
- uuid_vec_t vcur;
-
- // Creating a vector of currently displayed sub-categories UUIDs.
- for (outfits_map_t::const_iterator iter = mOutfitsMap.begin();
- iter != mOutfitsMap.end();
- iter++)
- {
- vcur.push_back((*iter).first);
- }
-
- // Sorting both vectors to compare.
- std::sort(vcur.begin(), vcur.end());
- std::sort(vnew.begin(), vnew.end());
-
uuid_vec_t vadded;
uuid_vec_t vremoved;
- uuid_vec_t::iterator it;
- size_t maxsize = llmax(vcur.size(), vnew.size());
- vadded.resize(maxsize);
- vremoved.resize(maxsize);
-
- // what to remove
- it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin());
- vremoved.erase(it, vremoved.end());
-
- // what to add
- it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin());
- vadded.erase(it, vadded.end());
+ // Create added and removed items vectors.
+ computeDifference(cat_array, vadded, vremoved);
// Handle added tabs.
for (uuid_vec_t::const_iterator iter = vadded.begin();
iter != vadded.end();
- iter++)
+ ++iter)
{
const LLUUID cat_id = (*iter);
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
@@ -168,28 +140,26 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
std::string name = cat->getName();
- // *TODO: create accordion tabs and lists from XML.
- LLAccordionCtrlTab::Params params;
- params.name(name);
- params.title(name);
- params.rect(LLRect(0, 0, 315, 20));
- params.display_children(false);
- LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(params);
-
- mAccordion->addCollapsibleCtrl(tab);
+ static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode();
- LLFlatListView::Params list_params;
- LLWearableItemsList* list = LLUICtrlFactory::create<LLWearableItemsList>(list_params);
+ accordionXmlNode->setAttributeString("name", name);
+ accordionXmlNode->setAttributeString("title", name);
+ LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL);
- tab->addChild(list, 0);
+ // *TODO: LLUICtrlFactory::defaultBuilder does not use "display_children" from xml. Should be investigated.
tab->setDisplayChildren(false);
+ mAccordion->addCollapsibleCtrl(tab);
// Map the new tab with outfit category UUID.
mOutfitsMap.insert(LLOutfitsList::outfits_map_value_t(cat_id, tab));
// Start observing the new outfit category.
+ LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list");
mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id));
+ // Setting drop down callback to monitor currently selected outfit.
+ tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::onTabExpandedCollapsed, this, list));
+
// Fetch the new outfit contents.
cat->fetch();
@@ -257,9 +227,60 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)
}
}
+void LLOutfitsList::onTabExpandedCollapsed(LLWearableItemsList* list)
+{
+ if (!list)
+ return;
+
+ // TODO: Add outfit selection handling.
+}
+
void LLOutfitsList::setFilterSubString(const std::string& string)
{
mFilterSubString = string;
}
+
+//////////////////////////////////////////////////////////////////////////
+// Private methods
+//////////////////////////////////////////////////////////////////////////
+LLXMLNodePtr LLOutfitsList::getAccordionTabXMLNode()
+{
+ LLXMLNodePtr xmlNode = NULL;
+ bool success = LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode);
+ if (!success)
+ {
+ llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl;
+ return NULL;
+ }
+
+ return xmlNode;
+}
+
+void LLOutfitsList::computeDifference(
+ const LLInventoryModel::cat_array_t& vcats,
+ uuid_vec_t& vadded,
+ uuid_vec_t& vremoved)
+{
+ uuid_vec_t vnew;
+ // Creating a vector of newly collected sub-categories UUIDs.
+ for (LLInventoryModel::cat_array_t::const_iterator iter = vcats.begin();
+ iter != vcats.end();
+ iter++)
+ {
+ vnew.push_back((*iter)->getUUID());
+ }
+
+ uuid_vec_t vcur;
+ // Creating a vector of currently displayed sub-categories UUIDs.
+ for (outfits_map_t::const_iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ iter++)
+ {
+ vcur.push_back((*iter).first);
+ }
+
+ LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);
+}
+
// EOF
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 892e0a862a..2d103ea356 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -35,12 +35,24 @@
#include "llpanel.h"
// newview
+#include "llinventorymodel.h"
#include "llinventoryobserver.h"
class LLAccordionCtrl;
class LLAccordionCtrlTab;
class LLWearableItemsList;
+/**
+ * @class LLOutfitsList
+ *
+ * A list of agents's outfits from "My Outfits" inventory category
+ * which displays each outfit in an accordion tab with a flat list
+ * of items inside it.
+ * Uses LLInventoryCategoriesObserver to monitor changes to "My Outfits"
+ * inventory category and refresh the outfits listed in it.
+ * This class is derived from LLInventoryObserver to know when inventory
+ * becomes usable and it is safe to request data from inventory model.
+ */
class LLOutfitsList : public LLPanel, public LLInventoryObserver
{
public:
@@ -56,9 +68,24 @@ public:
// Update tab displaying outfit identified by category_id.
void updateOutfitTab(const LLUUID& category_id);
+ void onTabExpandedCollapsed(LLWearableItemsList* list);
+
void setFilterSubString(const std::string& string);
private:
+ /**
+ * Reads xml with accordion tab and Flat list from xml file.
+ *
+ * @return LLPointer to XMLNode with accordion tab and flat list.
+ */
+ LLXMLNodePtr getAccordionTabXMLNode();
+
+ /**
+ * Wrapper for LLCommonUtils::computeDifference. @see LLCommonUtils::computeDifference
+ */
+ void computeDifference(const LLInventoryModel::cat_array_t& vcats, uuid_vec_t& vadded, uuid_vec_t& vremoved);
+
+
LLInventoryCategoriesObserver* mCategoriesObserver;
LLAccordionCtrl* mAccordion;
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 9ac3a07041..65fe7165c2 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -236,6 +236,7 @@ public:
std::string mCantViewParcelsText;
std::string mCantViewAccountsText;
+ std::string mEmptyParcelsText;
};
//*******************************************
@@ -452,6 +453,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
// This power was removed to make group roles simpler
//if ( !gAgent.hasPowerInGroup(mGroupID, GP_LAND_VIEW_OWNED) ) return;
if (!gAgent.isInGroup(mPanel.mGroupID)) return;
+ mGroupParcelsp->setCommentText(mEmptyParcelsText);
std::string name;
std::string desc;
@@ -696,6 +698,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
mImplementationp->mCantViewParcelsText = getString("cant_view_group_land_text");
mImplementationp->mCantViewAccountsText = getString("cant_view_group_accounting_text");
+ mImplementationp->mEmptyParcelsText = getString("epmty_view_group_land_text");
if ( mImplementationp->mMapButtonp )
{
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 8da19d1574..230e484fad 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -517,6 +517,11 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->setEnabled(TRUE);
+ //save sort state and set unsorted state to prevent unnecessary
+ //sorting while adding notices
+ bool save_sort = mNoticesList->isSorted();
+ mNoticesList->setNeedsSort(false);
+
for (;i<count;++i)
{
msg->getUUID("Data","NoticeID",id,i);
@@ -527,6 +532,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->setEnabled(FALSE);
return;
}
+
+ //with some network delays we can receive notice list more then once...
+ //so add only unique notices
+ S32 pos = mNoticesList->getItemIndex(id);
+
+ if(pos!=-1)//if items with this ID already in the list - skip it
+ continue;
msg->getString("Data","Subject",subj,i);
msg->getString("Data","FromName",name,i);
@@ -562,6 +574,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->addElement(row, ADD_BOTTOM);
}
+ mNoticesList->setNeedsSort(save_sort);
mNoticesList->updateSort();
}
@@ -656,6 +669,9 @@ void LLPanelGroupNotices::setGroupID(const LLUUID& id)
if(mViewMessage)
mViewMessage->clear();
+
+ if(mViewInventoryName)
+ mViewInventoryName->clear();
activate();
}
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index e139cb31d6..dbccd243da 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -38,6 +38,7 @@
#include "llagent.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llcofwearables.h"
#include "llfilteredwearablelist.h"
#include "llinventory.h"
#include "llinventoryitemslist.h"
@@ -73,6 +74,9 @@ const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE);
const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT);
const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK;
+static const std::string SAVE_BTN("save_btn");
+static const std::string REVERT_BTN("revert_btn");
+
class LLInventoryLookObserver : public LLInventoryObserver
{
public:
@@ -118,9 +122,15 @@ private:
LLPanelOutfitEdit::LLPanelOutfitEdit()
-: LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL),
-mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL),
-mRemoveFromOutfitBtn(NULL), mLookObserver(NULL)
+: LLPanel(),
+ mCurrentOutfitID(),
+ mFetchLook(NULL),
+ mSearchFilter(NULL),
+ mCOFWearables(NULL),
+ mInventoryItemsPanel(NULL),
+ mAddToOutfitBtn(NULL),
+ mRemoveFromOutfitBtn(NULL),
+ mLookObserver(NULL)
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
@@ -168,9 +178,8 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL);
childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL);
- mLookContents = getChild<LLScrollListCtrl>("look_items_list");
- mLookContents->sortByColumn("look_item_sort", TRUE);
- mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
+ mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list");
+ mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items");
mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
@@ -203,15 +212,6 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this));
childSetEnabled("add_to_outfit_btn", false);
- mUpBtn = getChild<LLButton>("up_btn");
- mUpBtn->setEnabled(TRUE);
- mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this));
-
- //*TODO rename mLookContents to mOutfitContents
- mLookContents = getChild<LLScrollListCtrl>("look_items_list");
- mLookContents->sortByColumn("look_item_sort", TRUE);
- mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
-
mRemoveFromOutfitBtn = getChild<LLButton>("remove_from_outfit_btn");
mRemoveFromOutfitBtn->setEnabled(FALSE);
mRemoveFromOutfitBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this));
@@ -221,10 +221,9 @@ BOOL LLPanelOutfitEdit::postBuild()
mEditWearableBtn->setVisible(FALSE);
mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this));
- childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
+ childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
- childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
- childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
+ childSetAction(SAVE_BTN, boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this));
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar;
@@ -234,10 +233,25 @@ BOOL LLPanelOutfitEdit::postBuild()
mWearableListManager = new LLFilteredWearableListManager(
getChild<LLInventoryItemsList>("filtered_wearables_list"), ALL_ITEMS_MASK);
+
+ childSetAction("move_closer_btn", boost::bind(&LLPanelOutfitEdit::moveWearable, this, true));
+ childSetAction("move_further_btn", boost::bind(&LLPanelOutfitEdit::moveWearable, this, false));
return TRUE;
}
+void LLPanelOutfitEdit::moveWearable(bool closer_to_body)
+{
+ LLUUID item_id = mCOFWearables->getSelectedUUID();
+ if (item_id.isNull()) return;
+
+ LLViewerInventoryItem* wearable_to_move = gInventory.getItem(item_id);
+ LLAppearanceMgr::getInstance()->moveWearable(wearable_to_move, closer_to_body);
+
+ //*TODO why not to listen to inventory?
+ updateLookInfo();
+}
+
void LLPanelOutfitEdit::showAddWearablesPanel()
{
childSetVisible("add_wearables_panel", childGetValue("add_btn"));
@@ -267,6 +281,8 @@ void LLPanelOutfitEdit::saveOutfit(bool as_new)
{
panel_outfits_inventory->onSave();
}
+
+ //*TODO how to get to know when base outfit is updated or new outfit is created?
}
void LLPanelOutfitEdit::showSaveMenu()
@@ -358,7 +374,7 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void)
void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
{
- LLUUID id_to_remove = mLookContents->getSelectionInterface()->getCurrentID();
+ LLUUID id_to_remove = mCOFWearables->getSelectedUUID();
LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove);
@@ -368,41 +384,9 @@ void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
}
-void LLPanelOutfitEdit::onUpClicked(void)
-{
- LLUUID inv_id = mLookContents->getSelectionInterface()->getCurrentID();
- if (inv_id.isNull())
- {
- //nothing selected, do nothing
- return;
- }
-
- LLViewerInventoryItem *link_item = gInventory.getItem(inv_id);
- if (!link_item)
- {
- llwarns << "could not find inventory item based on currently worn link." << llendl;
- return;
- }
-
-
- LLUUID asset_id = link_item->getAssetUUID();
- if (asset_id.isNull())
- {
- llwarns << "inventory link has null Asset ID. could not get object reference" << llendl;
- }
-
- static const std::string empty = "";
- LLWearableList::instance().getAsset(asset_id,
- empty, // don't care about wearable name
- link_item->getActualType(),
- LLSidepanelAppearance::editWearable,
- (void*)getParentUICtrl());
-}
-
-
void LLPanelOutfitEdit::onEditWearableClicked(void)
{
- LLUUID id_to_edit = mLookContents->getSelectionInterface()->getCurrentID();
+ LLUUID id_to_edit = mCOFWearables->getSelectedUUID();
LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit);
if (item_to_edit)
@@ -475,29 +459,11 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView
void LLPanelOutfitEdit::onOutfitItemSelectionChange(void)
{
- LLScrollListItem* item = mLookContents->getLastSelectedItem();
- if (!item)
- return;
-
- LLRect item_rect;
- mLookContents->localRectToOtherView(item->getRect(), &item_rect, this);
-
- // TODO button(and item list) should be removed (when new widget is ready)
- LLRect btn_rect = mEditWearableBtn->getRect();
- btn_rect.set(item_rect.mRight - btn_rect.getWidth(), item_rect.mTop, item_rect.mRight, item_rect.mBottom);
-
- mEditWearableBtn->setShape(btn_rect);
- sendChildToFront(mEditWearableBtn);
-
- mEditWearableBtn->setEnabled(TRUE);
- if (!mEditWearableBtn->getVisible())
- {
- mEditWearableBtn->setVisible(TRUE);
- }
+ LLUUID item_id = mCOFWearables->getSelectedUUID();
+ //*TODO show Edit Wearable Button
- const LLUUID& id_item_to_remove = item->getUUID();
- LLViewerInventoryItem* item_to_remove = gInventory.getItem(id_item_to_remove);
+ LLViewerInventoryItem* item_to_remove = gInventory.getItem(item_id);
if (!item_to_remove) return;
switch (item_to_remove->getType())
@@ -518,42 +484,15 @@ void LLPanelOutfitEdit::changed(U32 mask)
void LLPanelOutfitEdit::lookFetched(void)
{
- LLInventoryModel::cat_array_t cat_array;
- LLInventoryModel::item_array_t item_array;
-
- // collectDescendentsIf takes non-const reference:
- LLFindCOFValidItems is_cof_valid;
- gInventory.collectDescendentsIf(mCurrentOutfitID,
- cat_array,
- item_array,
- LLInventoryModel::EXCLUDE_TRASH,
- is_cof_valid);
- for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
- iter != item_array.end();
- iter++)
- {
- const LLViewerInventoryItem *item = (*iter);
-
- LLSD row;
- row["id"] = item->getUUID();
- LLSD& columns = row["columns"];
- columns[0]["column"] = "look_item";
- columns[0]["type"] = "text";
- columns[0]["value"] = item->getName();
- columns[1]["column"] = "look_item_sort";
- columns[1]["type"] = "text"; // TODO: multi-wearable sort "type" should go here.
- columns[1]["value"] = "BAR"; // TODO: Multi-wearable sort index should go here
-
- mLookContents->addElement(row);
- }
+ mCOFWearables->refresh();
+
+ updateVerbs();
}
void LLPanelOutfitEdit::updateLookInfo()
{
if (getVisible())
{
- mLookContents->clearRows();
-
mFetchLook->setFetchID(mCurrentOutfitID);
mFetchLook->startFetch();
if (mFetchLook->isFinished())
@@ -589,4 +528,15 @@ void LLPanelOutfitEdit::displayCurrentOutfit()
updateLookInfo();
}
+//private
+void LLPanelOutfitEdit::updateVerbs()
+{
+ bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty();
+
+ childSetEnabled(SAVE_BTN, outfit_is_dirty);
+ childSetEnabled(REVERT_BTN, outfit_is_dirty);
+
+ mSaveMenu->setItemEnabled("save_outfit", outfit_is_dirty);
+}
+
// EOF
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 308ee23115..21fa849289 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -45,6 +45,7 @@
#include "llinventorymodel.h"
class LLButton;
+class LLCOFWearables;
class LLTextBox;
class LLInventoryCategory;
class LLInventoryLookObserver;
@@ -87,6 +88,8 @@ public:
// Sends a request for data about the given parcel, which will
// only update the location if there is none already available.
+ void moveWearable(bool closer_to_body);
+
void showAddWearablesPanel();
void showWearablesFilter();
void showFilteredWearablesPanel();
@@ -100,7 +103,6 @@ public:
void onOutfitItemSelectionChange(void);
void onRemoveFromOutfitClicked(void);
void onEditWearableClicked(void);
- void onUpClicked(void);
void displayCurrentOutfit();
@@ -110,18 +112,18 @@ public:
private:
+ void updateVerbs();
+
//*TODO got rid of mCurrentOutfitID
LLUUID mCurrentOutfitID;
LLTextBox* mCurrentOutfitName;
- LLScrollListCtrl* mLookContents;
LLInventoryPanel* mInventoryItemsPanel;
LLFilterEditor* mSearchFilter;
LLSaveFolderState* mSavedFolderState;
std::string mSearchString;
LLButton* mAddToOutfitBtn;
LLButton* mRemoveFromOutfitBtn;
- LLButton* mUpBtn;
LLButton* mEditWearableBtn;
LLToggleableMenu* mSaveMenu;
@@ -130,6 +132,8 @@ private:
LLLookFetchObserver* mFetchLook;
LLInventoryLookObserver* mLookObserver;
std::vector<LLLookItemType> mLookItemTypes;
+
+ LLCOFWearables* mCOFWearables;
};
#endif // LL_LLPANELOUTFITEDIT_H
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index dcc85392f7..15684337f4 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -136,6 +136,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check
{
llwarns << "Invalid current item. (this should not happen)" << llendl;
+ llassert(!"Invalid current teleport histiry item");
return;
}
LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos);
@@ -166,6 +167,17 @@ void LLTeleportHistory::onHistoryChanged()
void LLTeleportHistory::purgeItems()
{
+ if (mItems.size() == 0) // no entries yet (we're called before login)
+ {
+ // If we don't return here the history will get into inconsistent state, hence:
+ // 1) updateCurrentLocation() will malfunction,
+ // so further teleports will not properly update the history;
+ // 2) mHistoryChangedSignal subscribers will be notified
+ // of such an invalid change. (EXT-6798)
+ // Both should not happen.
+ return;
+ }
+
if (mItems.size() > 0)
{
mItems.erase(mItems.begin(), mItems.end()-1);
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index c635f91423..430d62e15e 100644
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -89,6 +89,13 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange()
if (!th)
return;
+ // Hacky sanity check. (EXT-6798)
+ if (th->getItems().size() == 0)
+ {
+ llassert(!"Inconsistent teleport history state");
+ return;
+ }
+
const LLTeleportHistoryItem &item = th->getItems()[th->getCurrentItemIndex()];
addItem(item.mTitle, item.mGlobalPos);
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 986ccdf19b..2b529a4e50 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -50,6 +50,7 @@
#include "llnotifications.h"
#include "llfunctorregistry.h"
#include "llrootview.h"
+#include "llviewercontrol.h" // for gSavedSettings
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
@@ -279,7 +280,18 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->reshape(leditor_rect.getWidth(), leditor_rect.getHeight());
mLineEditor->setRect(leditor_rect);
mLineEditor->setText(edit_text_contents);
- mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1);
+
+ // decrease limit of line editor of teleport offer dialog to avoid truncation of
+ // location URL in invitation message, see EXT-6891
+ if ("OfferTeleport" == mNotification->getName())
+ {
+ mLineEditor->setMaxTextLength(gSavedSettings.getS32(
+ "teleport_offer_invitation_max_length"));
+ }
+ else
+ {
+ mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1);
+ }
LLToastPanel::addChild(mLineEditor);
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 2661c9f32b..9559311e3c 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -145,7 +145,7 @@ void audio_update_volume(bool force_update)
{
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
- music_volume = mute_volume * master_volume * (music_volume*music_volume);
+ music_volume = mute_volume * master_volume * music_volume;
gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume );
}
@@ -153,7 +153,7 @@ void audio_update_volume(bool force_update)
// Streaming Media
F32 media_volume = gSavedSettings.getF32("AudioLevelMedia");
BOOL media_muted = gSavedSettings.getBOOL("MuteMedia");
- media_volume = mute_volume * master_volume * (media_volume*media_volume);
+ media_volume = mute_volume * master_volume * media_volume;
LLViewerMedia::setVolume( media_muted ? 0.0f : media_volume );
// Voice
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f434d15843..b39ee8b2e0 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -67,6 +67,40 @@
#include "llviewermessage.h"
///----------------------------------------------------------------------------
+/// Helper class to store special inventory item names
+///----------------------------------------------------------------------------
+class LLLocalizedInventoryItemsDictionary : public LLSingleton<LLLocalizedInventoryItemsDictionary>
+{
+public:
+ std::map<std::string, std::string> mInventoryItemsDict;
+
+ LLLocalizedInventoryItemsDictionary()
+ {
+ mInventoryItemsDict["New Shape"] = LLTrans::getString("New Shape");
+ mInventoryItemsDict["New Skin"] = LLTrans::getString("New Skin");
+ mInventoryItemsDict["New Hair"] = LLTrans::getString("New Hair");
+ mInventoryItemsDict["New Eyes"] = LLTrans::getString("New Eyes");
+ mInventoryItemsDict["New Shirt"] = LLTrans::getString("New Shirt");
+ mInventoryItemsDict["New Pants"] = LLTrans::getString("New Pants");
+ mInventoryItemsDict["New Shoes"] = LLTrans::getString("New Shoes");
+ mInventoryItemsDict["New Socks"] = LLTrans::getString("New Socks");
+ mInventoryItemsDict["New Jacket"] = LLTrans::getString("New Jacket");
+ mInventoryItemsDict["New Gloves"] = LLTrans::getString("New Gloves");
+ mInventoryItemsDict["New Undershirt"] = LLTrans::getString("New Undershirt");
+ mInventoryItemsDict["New Underpants"] = LLTrans::getString("New Underpants");
+ mInventoryItemsDict["New Skirt"] = LLTrans::getString("New Skirt");
+ mInventoryItemsDict["New Alpha"] = LLTrans::getString("New Alpha");
+ mInventoryItemsDict["New Tattoo"] = LLTrans::getString("New Tattoo");
+ mInventoryItemsDict["Invalid Wearable"] = LLTrans::getString("Invalid Wearable");
+
+ mInventoryItemsDict["New Script"] = LLTrans::getString("New Script");
+ mInventoryItemsDict["New Folder"] = LLTrans::getString("New Folder");
+ mInventoryItemsDict["Contents"] = LLTrans::getString("Contents");
+ }
+};
+
+
+///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
@@ -316,6 +350,18 @@ BOOL LLViewerInventoryItem::unpackMessage(LLSD item)
BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
{
BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num);
+
+ std::string localized_str;
+
+ std::map<std::string, std::string>::const_iterator dictionary_iter;
+
+ dictionary_iter = LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.find(mName);
+
+ if(dictionary_iter != LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.end())
+ {
+ mName = dictionary_iter->second;
+ }
+
mIsComplete = TRUE;
return rv;
}
@@ -867,6 +913,25 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
U32 next_owner_perm,
LLPointer<LLInventoryCallback> cb)
{
+ //check if name is equal to one of special inventory items names
+ //EXT-5839
+ std::string server_name = name;
+
+ {
+ std::map<std::string, std::string>::const_iterator dictionary_iter;
+
+ for (dictionary_iter = LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.begin();
+ dictionary_iter != LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict.end();
+ dictionary_iter++)
+ {
+ const std::string& localized_name = dictionary_iter->second;
+ if(localized_name == name)
+ {
+ server_name = dictionary_iter->first;
+ }
+ }
+ }
+
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_CreateInventoryItem);
msg->nextBlock(_PREHASH_AgentData);
@@ -880,7 +945,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
msg->addS8Fast(_PREHASH_Type, (S8)asset_type);
msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);
msg->addU8Fast(_PREHASH_WearableType, (U8)wtype);
- msg->addStringFast(_PREHASH_Name, name);
+ msg->addStringFast(_PREHASH_Name, server_name);
msg->addStringFast(_PREHASH_Description, desc);
gAgent.sendReliableMessage();
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ba0c8d464d..3d042a8d8c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1700,6 +1700,7 @@ void LLOfferInfo::initRespondFunctionMap()
if(mRespondFunctions.empty())
{
mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
+ mRespondFunctions["ObjectGiveItemUnknownUser"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2);
}
}
@@ -1933,7 +1934,7 @@ protected:
}
};
-static void parse_lure_bucket(const std::string& bucket,
+static bool parse_lure_bucket(const std::string& bucket,
U64& region_handle,
LLVector3& pos,
LLVector3& look_at,
@@ -1945,15 +1946,25 @@ static void parse_lure_bucket(const std::string& bucket,
tokenizer tokens(bucket, sep);
tokenizer::iterator iter = tokens.begin();
- S32 gx = boost::lexical_cast<S32>((*(iter)).c_str());
- S32 gy = boost::lexical_cast<S32>((*(++iter)).c_str());
- S32 rx = boost::lexical_cast<S32>((*(++iter)).c_str());
- S32 ry = boost::lexical_cast<S32>((*(++iter)).c_str());
- S32 rz = boost::lexical_cast<S32>((*(++iter)).c_str());
- S32 lx = boost::lexical_cast<S32>((*(++iter)).c_str());
- S32 ly = boost::lexical_cast<S32>((*(++iter)).c_str());
- S32 lz = boost::lexical_cast<S32>((*(++iter)).c_str());
-
+ S32 gx,gy,rx,ry,rz,lx,ly,lz;
+ try
+ {
+ gx = boost::lexical_cast<S32>((*(iter)).c_str());
+ gy = boost::lexical_cast<S32>((*(++iter)).c_str());
+ rx = boost::lexical_cast<S32>((*(++iter)).c_str());
+ ry = boost::lexical_cast<S32>((*(++iter)).c_str());
+ rz = boost::lexical_cast<S32>((*(++iter)).c_str());
+ lx = boost::lexical_cast<S32>((*(++iter)).c_str());
+ ly = boost::lexical_cast<S32>((*(++iter)).c_str());
+ lz = boost::lexical_cast<S32>((*(++iter)).c_str());
+ }
+ catch( boost::bad_lexical_cast& )
+ {
+ LL_WARNS("parse_lure_bucket")
+ << "Couldn't parse lure bucket."
+ << LL_ENDL;
+ return false;
+ }
// Grab region access
region_access = SIM_ACCESS_MIN;
if (++iter != tokens.end())
@@ -1978,6 +1989,7 @@ static void parse_lure_bucket(const std::string& bucket,
look_at.setVec((F32)lx, (F32)ly, (F32)lz);
region_handle = to_region_handle(gx, gy);
+ return true;
}
void process_improved_im(LLMessageSystem *msg, void **user_data)
@@ -2615,15 +2627,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
U64 region_handle;
U8 region_access;
std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size);
- parse_lure_bucket(region_info, region_handle, pos, look_at, region_access);
+ std::string region_access_str = LLStringUtil::null;
+ std::string region_access_icn = LLStringUtil::null;
- std::string region_access_str = LLViewerRegion::accessToString(region_access);
+ if (parse_lure_bucket(region_info, region_handle, pos, look_at, region_access))
+ {
+ region_access_str = LLViewerRegion::accessToString(region_access);
+ region_access_icn = LLViewerRegion::getAccessIcon(region_access);
+ }
LLSD args;
// *TODO: Translate -> [FIRST] [LAST] (maybe)
args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about");
args["MESSAGE"] = message;
- args["MATURITY"] = region_access_str;
+ args["MATURITY_STR"] = region_access_str;
+ args["MATURITY_ICON"] = region_access_icn;
LLSD payload;
payload["from_id"] = from_id;
payload["lure_id"] = session_id;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 07d4ac664f..c48668df9a 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -627,6 +627,26 @@ std::string LLViewerRegion::accessToString(U8 sim_access)
}
// static
+std::string LLViewerRegion::getAccessIcon(U8 sim_access)
+{
+ switch(sim_access)
+ {
+ case SIM_ACCESS_MATURE:
+ return "Parcel_M_Dark";
+
+ case SIM_ACCESS_ADULT:
+ return "Parcel_R_Light";
+
+ case SIM_ACCESS_PG:
+ return "Parcel_PG_Light";
+
+ case SIM_ACCESS_MIN:
+ default:
+ return "";
+ }
+}
+
+// static
std::string LLViewerRegion::accessToShortString(U8 sim_access)
{
switch(sim_access) /* Flawfinder: ignore */
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 49d0900f2a..5c4d5a61fd 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -203,6 +203,9 @@ public:
// Returns "M", "PG", "A" etc.
static std::string accessToShortString(U8 sim_access);
+
+ // Return access icon name
+ static std::string getAccessIcon(U8 sim_access);
// helper function which just makes sure all interested parties
// can process the message.
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index ff309cbbc3..3d110dcc78 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -62,7 +62,10 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list");
-LLWearableItemsList::LLWearableItemsList(const LLFlatListView::Params& p)
+LLWearableItemsList::Params::Params()
+{}
+
+LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
: LLInventoryItemsList(p)
{}
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index e3b011912b..e7ccba8e6c 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -34,23 +34,32 @@
#include "llpanel.h"
-#include "llassettype.h"
-
-#include "llinventorytype.h"
-
// newview
#include "llinventoryitemslist.h"
+/**
+ * @class LLWearableItemsList
+ *
+ * A flat list of wearable inventory items.
+ * Collects all items that can be a part of an outfit from
+ * an inventory category specified by UUID and displays them
+ * as a flat list.
+ */
class LLWearableItemsList : public LLInventoryItemsList
{
public:
+ struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params>
+ {
+ Params();
+ };
+
virtual ~LLWearableItemsList();
void updateList(const LLUUID& category_id);
protected:
friend class LLUICtrlFactory;
- LLWearableItemsList(const LLFlatListView::Params& p);
+ LLWearableItemsList(const LLWearableItemsList::Params& p);
};
#endif //LL_LLWEARABLEITEMSLIST_H
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index b2de31218b..20266706da 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -235,9 +235,7 @@ LLWearable* LLWearableList::createNewWearable( EWearableType type )
LLWearable *wearable = generateNewWearable();
wearable->setType( type );
- LLSD item_name = LLSD().with("[WEARABLE_ITEM]", wearable->getTypeLabel());
- std::string name = LLTrans::getString("NewWearable");
- LLStringUtil::format(name, item_name);
+ std::string name = LLTrans::getString( LLWearableDictionary::getTypeDefaultNewName(wearable->getType()) );
wearable->setName( name );
LLPermissions perm;
diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png
new file mode 100644
index 0000000000..58b56003c4
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png
new file mode 100644
index 0000000000..07fe0be8a3
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_10.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png
new file mode 100644
index 0000000000..215d68cc46
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_11.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png
new file mode 100644
index 0000000000..d755588621
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_12.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png
new file mode 100644
index 0000000000..6640ee227b
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png
new file mode 100644
index 0000000000..5decbe977e
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png
new file mode 100644
index 0000000000..56e81c17aa
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_4.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png
new file mode 100644
index 0000000000..a89bf2ac62
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_5.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png
new file mode 100644
index 0000000000..233c479540
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png
new file mode 100644
index 0000000000..631d7a6819
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_7.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png
new file mode 100644
index 0000000000..ac0e3f13f7
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_8.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png
new file mode 100644
index 0000000000..17fb4a0335
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Progress_9.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 84a99ba92a..1080ff347c 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -580,4 +580,17 @@ with the same filename but different name
<texture name="default_profile_picture.j2c" />
<texture name="locked_image.j2c" />
+ <texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" />
+ <texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" />
+ <texture name="Progress_3" file_name="icons/Progress_3.png" preload="false" />
+ <texture name="Progress_4" file_name="icons/Progress_4.png" preload="false" />
+ <texture name="Progress_5" file_name="icons/Progress_5.png" preload="false" />
+ <texture name="Progress_6" file_name="icons/Progress_6.png" preload="false" />
+ <texture name="Progress_7" file_name="icons/Progress_7.png" preload="false" />
+ <texture name="Progress_8" file_name="icons/Progress_8.png" preload="false" />
+ <texture name="Progress_9" file_name="icons/Progress_9.png" preload="false" />
+ <texture name="Progress_10" file_name="icons/Progress_10.png" preload="false" />
+ <texture name="Progress_11" file_name="icons/Progress_11.png" preload="false" />
+ <texture name="Progress_12" file_name="icons/Progress_12.png" preload="false" />
+
</textures>
diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml
index 5322febe27..38e72dbadf 100644
--- a/indra/newview/skins/default/xui/de/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_about_land.xml
@@ -264,7 +264,7 @@ werden.
<text left="204" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="410">
+ <text name="Autoreturn">
Objekte anderer Einwohner automatisch zurückgeben (Minuten, 0 für aus):
</text>
<line_editor name="clean other time" right="-10" width="56"/>
diff --git a/indra/newview/skins/default/xui/de/floater_buy_object.xml b/indra/newview/skins/default/xui/de/floater_buy_object.xml
index b23163b4a3..c697014b04 100644
--- a/indra/newview/skins/default/xui/de/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/de/floater_buy_object.xml
@@ -6,7 +6,7 @@
<text name="buy_text">
[AMOUNT] L$ von [NAME] kaufen?
</text>
- <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn" width="73"/>
+ <button label="Abbrechen" label_selected="Abbrechen" name="cancel_btn"/>
<button label="Kaufen" label_selected="Kaufen" name="buy_btn"/>
<text name="title_buy_text">
Kaufen
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 59f1889808..40c6b14a4a 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1061,7 +1061,8 @@ Leyla Linden </text>
left="10"
name="Autoreturn"
top_pad="0"
- width="310">
+ width="412"
+ wrap="true">
Auto return other Residents&apos; objects (minutes, 0 for off):
</text>
<line_editor
@@ -1073,9 +1074,9 @@ Leyla Linden </text>
layout="topleft"
max_length="6"
name="clean other time"
- right="-72"
- width="56"
- top_delta="-6"/>
+ left_pad="0"
+ width="46"
+ top_delta="-2"/>
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml
index f0e5e30010..3d8f5d678b 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml
@@ -5,7 +5,7 @@
height="290"
layout="topleft"
min_height="150"
- min_width="200"
+ min_width="225"
name="contents"
help_topic="contents"
save_rect="true"
@@ -52,7 +52,7 @@
<text
type="string"
length="1"
- follows="all"
+ follows="left|top|right"
font="SansSerif"
height="16"
layout="topleft"
@@ -90,7 +90,8 @@
name="buy_text"
text_color="white"
top_pad="5"
- width="276">
+ use_ellipses="true"
+ width="260">
Buy for L$[AMOUNT] from [NAME]?
</text>
<button
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index 5ea207675b..9db6568ee3 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -119,7 +119,7 @@ No Answer. Please try again later.
layout="topleft"
left="77"
name="leaving"
- top="52"
+ top="62"
width="315"
word_wrap="true">
Leaving [CURRENT_CHAT].
diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml
index 8e1e5ff062..a585069faa 100644
--- a/indra/newview/skins/default/xui/en/mime_types.xml
+++ b/indra/newview/skins/default/xui/en/mime_types.xml
@@ -120,7 +120,7 @@
none
</widgettype>
<impl>
- media_plugin_quicktime
+ media_plugin_webkit
</impl>
</mimetype>
<mimetype name="none/none">
@@ -130,6 +130,9 @@
<widgettype>
none
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
@@ -160,6 +163,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
@@ -179,6 +185,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
@@ -187,6 +196,9 @@
<widgettype>
audio
</widgettype>
+ <impl>
+ media_plugin_quicktime
+ </impl>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
@@ -195,6 +207,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
@@ -203,6 +218,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
@@ -211,6 +229,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
@@ -219,6 +240,9 @@
<widgettype>
movie
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
@@ -227,6 +251,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
@@ -235,6 +262,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml
index 4748c14554..e95b371d00 100644
--- a/indra/newview/skins/default/xui/en/mime_types_linux.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml
@@ -120,7 +120,7 @@
none
</widgettype>
<impl>
- media_plugin_gstreamer
+ media_plugin_webkit
</impl>
</mimetype>
<mimetype name="none/none">
@@ -130,6 +130,9 @@
<widgettype>
none
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
@@ -160,6 +163,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
@@ -179,6 +185,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
@@ -187,6 +196,9 @@
<widgettype>
audio
</widgettype>
+ <impl>
+ media_plugin_gstreamer
+ </impl>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
@@ -195,6 +207,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
@@ -203,6 +218,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
@@ -211,6 +229,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
@@ -219,6 +240,9 @@
<widgettype>
movie
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
@@ -227,6 +251,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
@@ -235,6 +262,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml
index 8e1e5ff062..7931e55c0a 100644
--- a/indra/newview/skins/default/xui/en/mime_types_mac.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml
@@ -130,6 +130,9 @@
<widgettype>
none
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
@@ -160,6 +163,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
@@ -179,6 +185,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
@@ -187,6 +196,9 @@
<widgettype>
audio
</widgettype>
+ <impl>
+ media_plugin_quicktime
+ </impl>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
@@ -195,6 +207,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
@@ -203,6 +218,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
@@ -211,6 +229,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
@@ -219,6 +240,9 @@
<widgettype>
movie
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
@@ -227,6 +251,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
@@ -235,6 +262,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 5d184fea3a..4479a3dd4d 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5168,7 +5168,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th
type="offer">
[NAME_SLURL] has offered to teleport you to their location:
-[MESSAGE], ([MATURITY])
+[MESSAGE] - [MATURITY_STR] &lt;icon&gt;[MATURITY_ICON]&lt;/icon&gt;
<form name="form">
<button
index="0"
diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
new file mode 100644
index 0000000000..b3150bb98b
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder-->
+<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime-->
+<accordion_tab
+ display_children="false"
+ follows="all"
+ height="45"
+ layout="topleft"
+ name="Mockup Tab"
+ title="Mockup Tab"
+ width="0">
+ <wearable_items_list
+ allow_select="true"
+ follows="all"
+ keep_one_selected="true"
+ name="wearable_items_list"
+ />
+</accordion_tab>
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
new file mode 100644
index 0000000000..01c7ae61d2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ border="false"
+ bottom="0"
+ follows="all"
+ height="200"
+ left="0"
+ name="cof_wearables"
+ width="313">
+ <accordion
+ follows="all"
+ height="373"
+ layout="topleft"
+ left="3"
+ top="0"
+ name="cof_wearables_accordion"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ width="307">
+ <accordion_tab
+ layout="topleft"
+ name="tab_attachments"
+ title="Attachments">
+ <flat_list_view
+ allow_select="true"
+ follows="all"
+ height="150"
+ layout="topleft"
+ left="0"
+ name="list_attachments"
+ top="0"
+ width="307" />
+ </accordion_tab>
+ <accordion_tab
+ layout="topleft"
+ name="tab_clothing"
+ title="Clothing">
+ <flat_list_view
+ allow_select="true"
+ follows="all"
+ height="150"
+ layout="topleft"
+ left="0"
+ name="list_clothing"
+ top="0"
+ width="307" />
+ </accordion_tab>
+ <accordion_tab
+ layout="topleft"
+ name="tab_body_parts"
+ title="Body Parts">
+ <flat_list_view
+ allow_select="true"
+ follows="all"
+ height="150"
+ layout="topleft"
+ left="0"
+ name="list_body_parts"
+ top="0"
+ width="307" />
+ </accordion_tab>
+ </accordion>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index 9e99a8ceaf..76f7484c68 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -17,6 +17,10 @@
You don&apos;t have permission to view group owned land
</panel.string>
<panel.string
+ name="epmty_view_group_land_text">
+ No entries
+ </panel.string>
+ <panel.string
name="cant_view_group_accounting_text">
You don&apos;t have permission to view the group&apos;s accounting information.
</panel.string>
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 184ea54fcb..5dbd8bfe6a 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -17,7 +17,7 @@
layout="topleft"
left_delta="3"
left="0"
- max_length="512"
+ max_length="1024"
name="chat_box"
text_pad_left="5"
text_pad_right="25"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index b1f0ff15cb..73181392c9 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -149,29 +149,18 @@
auto_resize="true"
user_resize="true">
- <scroll_list
- width="300"
- column_padding="0"
- draw_heading="false"
- draw_stripes="false"
+ <!-- List containing items from the COF and Base outfit -->
+ <panel
+ background_visible="false"
+ class="cof_wearables"
+ filename="panel_cof_wearables.xml"
follows="left|top|right|bottom"
+ height="193"
layout="topleft"
- name="look_items_list"
- search_column="1"
- sort_column="2"
left="0"
- height="193"
- top="0">
- <scroll_list.columns
- label="Look Item"
- name="look_item"
- width="285" />
- <scroll_list.columns
- label="Outfit Item Sort"
- width="0"
- sort_column="look_item_sort"
- name="look_item_sort" />
- </scroll_list>
+ name="cof_wearables_list"
+ top="0"
+ width="300" />
<panel
background_visible="true"
@@ -222,6 +211,30 @@
top="1"
width="31" />
<button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Movement_Forward_On"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="move_closer_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Movement_Backward_On"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="move_further_btn"
+ top="1"
+ width="31" />
+ <button
follows="bottom|right"
height="25"
image_hover_unselected="Toolbar_Middle_Over"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index 500e65b916..2c6ceeef2e 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -374,5 +374,5 @@
min_val="10"
name="web_proxy_port"
top_delta="0"
- width="140" />
+ width="145" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index ec41703979..bf30e89a59 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3117,4 +3117,7 @@ Abuse Report</string>
<string name="DefaultMimeType">none/none</string>
<string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string>
+ <!-- language specific white-space characters, delimiters, spacers, item separation symbols -->
+ <string name="sentences_separator" value=" "></string>
+
</strings>
diff --git a/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml b/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml
new file mode 100644
index 0000000000..6040d24128
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<loading_indicator
+ follows="left|top"
+ mouse_opaque="false"
+ name="loading_indicator"
+ rotations_per_sec="1.0"
+ tab_stop="false"
+/>
diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml
index 6118a63872..f3a278945c 100644
--- a/indra/newview/skins/default/xui/es/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/es/floater_about_land.xml
@@ -263,7 +263,7 @@ Vaya al menú Mundo &gt; Acerca del terreno o seleccione otra parcela para ver s
<text left="204" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="412">
+ <text name="Autoreturn">
Devolución automát. de objetos de otros (en min., 0 la desactiva):
</text>
<line_editor name="clean other time" right="-20"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml
index 5d630cdf48..2e52a90373 100644
--- a/indra/newview/skins/default/xui/fr/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml
@@ -267,7 +267,7 @@ ou divisé.
<text left_delta="214" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="440">
+ <text name="Autoreturn">
Renvoi automatique des objets d&apos;autres résidents (minutes, 0 pour désactiver) :
</text>
<line_editor name="clean other time" right="-6" width="36"/>
diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml
index bc23c2e8ff..742cdf44a5 100644
--- a/indra/newview/skins/default/xui/it/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/it/floater_about_land.xml
@@ -266,7 +266,7 @@ o suddivisa.
<text left="214" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="412">
+ <text name="Autoreturn">
Restituzione automatica degli oggetti di altri residenti (minuti, 0 per disattivarla):
</text>
<line_editor name="clean other time" right="-20"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml
index c9c01bc2a4..d23ab3565b 100644
--- a/indra/newview/skins/default/xui/ja/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml
@@ -264,7 +264,7 @@
<text left="200" name="selected_objects_text">
[COUNT]
</text>
- <text name="Autoreturn" width="500">
+ <text name="Autoreturn">
他人のオブジェクトを自動返却(分単位、0 で自動返却なし):
</text>
<line_editor left_delta="5" name="clean other time" right="-80"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml
index 252969609a..cebf03755b 100644
--- a/indra/newview/skins/default/xui/pt/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml
@@ -265,7 +265,7 @@ ou sub-divididos.
<text left="214" name="selected_objects_text" width="48">
[COUNT]
</text>
- <text left="4" name="Autoreturn" width="412">
+ <text name="Autoreturn">
Devolver objetos de outros residentes (p/ desligar tecle 0)
</text>
<line_editor name="clean other time" right="-10"/>
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 19b18b3282..668e21c253 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -332,6 +332,12 @@ class WindowsManifest(ViewerManifest):
self.path("media_plugin_webkit.dll")
self.end_prefix()
+ # winmm.dll shim
+ if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst="llplugin"):
+ self.path("winmm.dll")
+ self.end_prefix()
+
+
if self.args['configuration'].lower() == 'debug':
if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'),
dst="llplugin"):