diff options
author | callum_linden <none@none> | 2015-08-31 11:17:28 -0700 |
---|---|---|
committer | callum_linden <none@none> | 2015-08-31 11:17:28 -0700 |
commit | 1db2c7276d0bb1039ad8be9240201732ad5387cd (patch) | |
tree | a2bc6f6f80772cc459f23a075ba3bc0b75b5de48 /indra/newview/llfloaterhardwaresettings.cpp | |
parent | 0ad81961cd5aea97231959fd31daa22dd2d8908a (diff) | |
parent | 1be63209331d509396bd7ee79302d511fe83d72e (diff) |
Merge with viewer-release
Diffstat (limited to 'indra/newview/llfloaterhardwaresettings.cpp')
-rwxr-xr-x | indra/newview/llfloaterhardwaresettings.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 035eb307c2..62d7efc8b2 100755 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -82,6 +82,7 @@ void LLFloaterHardwareSettings::refresh() mVideoCardMem = gSavedSettings.getS32("TextureMemory"); mFogRatio = gSavedSettings.getF32("RenderFogRatio"); mProbeHardwareOnStartup = gSavedSettings.getBOOL("ProbeHardwareOnStartup"); + mCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) mFSAASamples); refreshEnabledState(); @@ -149,6 +150,7 @@ void LLFloaterHardwareSettings::refreshEnabledState() BOOL LLFloaterHardwareSettings::postBuild() { childSetAction("OK", onBtnOK, this); + childSetAction("Cancel", onBtnCancel, this); // Don't do this on Mac as their braindead GL versioning // sets this when 8x and 16x are indeed available @@ -179,18 +181,17 @@ void LLFloaterHardwareSettings::apply() void LLFloaterHardwareSettings::cancel() { - gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO); - gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso); - gSavedSettings.setU32("RenderFSAASamples", mFSAASamples); - gSavedSettings.setF32("RenderGamma", mGamma); - gSavedSettings.setS32("TextureMemory", mVideoCardMem); - gSavedSettings.setF32("RenderFogRatio", mFogRatio); - gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup ); - closeFloater(); } // static +void LLFloaterHardwareSettings::onBtnCancel( void* userdata ) +{ + LLFloaterHardwareSettings *fp =(LLFloaterHardwareSettings *)userdata; + fp->cancel(); +} + +// static void LLFloaterHardwareSettings::onBtnOK( void* userdata ) { LLFloaterHardwareSettings *fp =(LLFloaterHardwareSettings *)userdata; @@ -198,4 +199,14 @@ void LLFloaterHardwareSettings::onBtnOK( void* userdata ) fp->closeFloater(false); } - +void LLFloaterHardwareSettings::onClose(bool app_quitting) +{ + gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO); + gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso); + gSavedSettings.setU32("RenderFSAASamples", mFSAASamples); + gSavedSettings.setF32("RenderGamma", mGamma); + gSavedSettings.setS32("TextureMemory", mVideoCardMem); + gSavedSettings.setF32("RenderFogRatio", mFogRatio); + gSavedSettings.setBOOL("ProbeHardwareOnStartup", mProbeHardwareOnStartup ); + gSavedSettings.setBOOL("RenderCompressTextures", mCompressTextures ); +} |