summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-08-19 16:01:20 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-08-19 16:01:20 +0100
commit898dfdb52d24701bb2e51fd783c91721c0f5f40e (patch)
treea16c783a4f49dd6be78aa3ac49782cbe0c9a3311 /indra/newview/llappviewer.cpp
parent7e37263fc5cb93e31727b2e3243f2221ed1f8cad (diff)
parente8b31d03b4f6f0ffb981b4ea150743daf7b4a958 (diff)
Merge remote-tracking branch 'origin/master' into SL-12995
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9401481e8c..75574df00e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1131,7 +1131,10 @@ bool LLAppViewer::init()
gSimLastTime = gRenderStartTime.getElapsedTimeF32();
gSimFrames = (F32)gFrameCount;
- LLViewerJoystick::getInstance()->init(false);
+ if (gSavedSettings.getBOOL("JoystickEnabled"))
+ {
+ LLViewerJoystick::getInstance()->init(false);
+ }
try {
initializeSecHandler();
@@ -1848,8 +1851,11 @@ bool LLAppViewer::cleanup()
delete gKeyboard;
gKeyboard = NULL;
- // Turn off Space Navigator and similar devices
- LLViewerJoystick::getInstance()->terminate();
+ if (LLViewerJoystick::instanceExists())
+ {
+ // Turn off Space Navigator and similar devices
+ LLViewerJoystick::getInstance()->terminate();
+ }
LL_INFOS() << "Cleaning up Objects" << LL_ENDL;
@@ -3129,8 +3135,8 @@ LLSD LLAppViewer::getViewerInfo() const
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());
// Moved hack adjustment to Windows memory size into llsys.cpp
info["OS_VERSION"] = LLOSInfo::instance().getOSString();
- info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
- info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
+ info["GRAPHICS_CARD_VENDOR"] = ll_safe_string((const char*)(glGetString(GL_VENDOR)));
+ info["GRAPHICS_CARD"] = ll_safe_string((const char*)(glGetString(GL_RENDERER)));
#if LL_WINDOWS
std::string drvinfo = gDXHardware.getDriverVersionWMI();
@@ -3149,7 +3155,7 @@ LLSD LLAppViewer::getViewerInfo() const
}
#endif
- info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
+ info["OPENGL_VERSION"] = ll_safe_string((const char*)(glGetString(GL_VERSION)));
// Settings
@@ -4518,6 +4524,7 @@ void LLAppViewer::saveFinalSnapshot()
gViewerWindow->getWindowWidthRaw(),
gViewerWindow->getWindowHeightRaw(),
FALSE,
+ gSavedSettings.getBOOL("RenderHUDInSnapshot"),
TRUE,
LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
LLSnapshotModel::SNAPSHOT_FORMAT_PNG);