summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterhardwaresettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterhardwaresettings.cpp')
-rw-r--r--indra/newview/llfloaterhardwaresettings.cpp64
1 files changed, 11 insertions, 53 deletions
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 38915ebff9..3c3508b65c 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -38,7 +38,7 @@
#include "llfloaterpreference.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llfeaturemanager.h"
#include "llstartup.h"
#include "pipeline.h"
@@ -47,14 +47,12 @@
#include "llradiogroup.h"
#include "lluictrlfactory.h"
#include "llwindow.h"
-#include "llimagegl.h"
+#include "llslider.h"
-LLFloaterHardwareSettings* LLFloaterHardwareSettings::sHardwareSettings = NULL;
-
-LLFloaterHardwareSettings::LLFloaterHardwareSettings()
- : LLFloater()
+LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key)
+ : LLFloater(key)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hardware_settings.xml");
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hardware_settings.xml");
}
LLFloaterHardwareSettings::~LLFloaterHardwareSettings()
@@ -91,10 +89,10 @@ void LLFloaterHardwareSettings::refresh()
void LLFloaterHardwareSettings::refreshEnabledState()
{
- S32 min_tex_mem = LLViewerImageList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerImageList::getMaxVideoRamSetting();
- childSetMinValue("GrapicsCardTextureMemory", min_tex_mem);
- childSetMaxValue("GrapicsCardTextureMemory", max_tex_mem);
+ S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
+ S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting();
+ getChild<LLSlider>("GrapicsCardTextureMemory")->setMinValue(min_tex_mem);
+ getChild<LLSlider>("GrapicsCardTextureMemory")->setMinValue(max_tex_mem);
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
!gGLManager.mHasVertexBufferObject)
@@ -109,48 +107,6 @@ void LLFloaterHardwareSettings::refreshEnabledState()
}
-// static instance of it
-LLFloaterHardwareSettings* LLFloaterHardwareSettings::instance()
-{
- if (!sHardwareSettings)
- {
- sHardwareSettings = new LLFloaterHardwareSettings();
- sHardwareSettings->closeFloater();
- }
- return sHardwareSettings;
-}
-void LLFloaterHardwareSettings::show()
-{
- LLFloaterHardwareSettings* hardSettings = instance();
- hardSettings->refresh();
- hardSettings->center();
-
- // comment in if you want the menu to rebuild each time
- //LLUICtrlFactory::getInstance()->buildFloater(hardSettings, "floater_hardware_settings.xml");
- //hardSettings->initCallbacks();
-
- hardSettings->openFloater();
-}
-
-bool LLFloaterHardwareSettings::isOpen()
-{
- if (sHardwareSettings != NULL)
- {
- return true;
- }
- return false;
-}
-
-// virtual
-void LLFloaterHardwareSettings::onClose(bool app_quitting)
-{
- if (sHardwareSettings)
- {
- sHardwareSettings->setVisible(FALSE);
- }
-}
-
-
//============================================================================
BOOL LLFloaterHardwareSettings::postBuild()
@@ -158,6 +114,7 @@ BOOL LLFloaterHardwareSettings::postBuild()
childSetAction("OK", onBtnOK, this);
refresh();
+ center();
// load it up
initCallbacks();
@@ -217,3 +174,4 @@ void LLFloaterHardwareSettings::onBtnOK( void* userdata )
fp->closeFloater(false);
}
+