summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindowwin32.cpp29
-rw-r--r--indra/newview/llfeaturemanager.cpp5
-rw-r--r--indra/newview/llfloaterpreference.cpp10
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp4
-rw-r--r--indra/newview/llteleporthistory.cpp2
5 files changed, 40 insertions, 10 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index f98c2423e5..cbda906599 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -754,7 +754,6 @@ void LLWindowWin32::close()
// Make sure cursor is visible and we haven't mangled the clipping state.
setMouseClipping(FALSE);
- showCursor();
// Go back to screen mode written in the registry.
if (mFullscreen)
@@ -762,9 +761,23 @@ void LLWindowWin32::close()
resetDisplayResolution();
}
+ // Don't process events in our mainWindowProc any longer.
+ SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, NULL);
+ if (mCallbacks)
+ {
+ mCallbacks->handleFocusLost(this);
+ }
+ else
+ {
+ showCursor();
+ }
+
// Clean up remaining GL state
- LL_DEBUGS("Window") << "Shutting down GL" << LL_ENDL;
- gGLManager.shutdownGL();
+ if (gGLManager.mInited)
+ {
+ LL_INFOS("Window") << "Cleaning up GL" << LL_ENDL;
+ gGLManager.shutdownGL();
+ }
LL_DEBUGS("Window") << "Releasing Context" << LL_ENDL;
if (mhRC)
@@ -785,16 +798,16 @@ void LLWindowWin32::close()
// Restore gamma to the system values.
restoreGamma();
- if (mhDC && !ReleaseDC(mWindowHandle, mhDC))
+ if (mhDC)
{
- LL_WARNS("Window") << "Release of ghDC failed" << LL_ENDL;
+ if (!ReleaseDC(mWindowHandle, mhDC))
+ {
+ LL_WARNS("Window") << "Release of ghDC failed" << LL_ENDL;
+ }
mhDC = NULL;
}
LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
-
- // Don't process events in our mainWindowProc any longer.
- SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, NULL);
// Make sure we don't leave a blank toolbar button.
ShowWindow(mWindowHandle, SW_HIDE);
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 6cf93b547e..8d07035b97 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -461,6 +461,11 @@ bool LLFeatureManager::loadGPUClass()
{
mGPUClass = GPU_CLASS_4;
}
+ if (gGLManager.mIsIntel && mGPUClass > GPU_CLASS_1)
+ {
+ // Intels are generally weaker then other GPUs despite having advanced features
+ mGPUClass = (EGPUClass)(mGPUClass - 1);
+ }
#endif
}
else if (gGLManager.mGLVersion <= 2.f)
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 4ce35643b1..7aff9fb586 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2704,6 +2704,16 @@ void LLPanelPreferenceGraphics::cancel()
void LLPanelPreferenceGraphics::saveSettings()
{
resetDirtyChilds();
+ std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive");
+ if (preset_graphic_active.empty())
+ {
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ //don't restore previous preset after closing Preferences
+ instance->saveGraphicsPreset(preset_graphic_active);
+ }
+ }
LLPanelPreference::saveSettings();
}
void LLPanelPreferenceGraphics::setHardwareDefaults()
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index bdef718d0e..6320c6b626 100644
--- a/indra/newview/llfloatersaveprefpreset.cpp
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -76,7 +76,7 @@ void LLFloaterSavePrefPreset::onOpen(const LLSD& key)
setTitle(floater_title);
- EDefaultOptions option = DEFAULT_TOP;
+ EDefaultOptions option = DEFAULT_HIDE;
LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option);
onPresetNameEdited();
@@ -98,7 +98,7 @@ void LLFloaterSavePrefPreset::onBtnSave()
void LLFloaterSavePrefPreset::onPresetsListChange()
{
- EDefaultOptions option = DEFAULT_TOP;
+ EDefaultOptions option = DEFAULT_HIDE;
LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option);
}
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index a20d69dd41..3c3c1c96ef 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -116,6 +116,8 @@ void LLTeleportHistory::handleLoginComplete()
void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
{
+ if (!gAgent.getRegion()) return;
+
if (!mTeleportHistoryStorage)
{
mTeleportHistoryStorage = LLTeleportHistoryStorage::getInstance();