summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llapp.cpp24
-rw-r--r--indra/llcommon/llapp.h5
-rw-r--r--indra/llcommon/llversionviewer.h6
-rw-r--r--indra/newview/app_settings/cmd_line.xml16
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterF.glsl2
-rw-r--r--indra/newview/featuretable.txt18
-rw-r--r--indra/newview/gpu_table.txt12
-rw-r--r--indra/newview/llappviewer.cpp31
-rw-r--r--indra/newview/llappviewerlinux.cpp73
-rw-r--r--indra/newview/llappviewerlinux.h1
-rw-r--r--indra/newview/llappviewermacosx.cpp5
-rw-r--r--indra/newview/llappviewermacosx.h4
-rw-r--r--indra/newview/llappviewerwin32.cpp5
-rw-r--r--indra/newview/llappviewerwin32.h5
-rw-r--r--indra/newview/lldebugview.cpp5
-rw-r--r--indra/newview/llfloatercamera.cpp64
-rw-r--r--indra/newview/llfloaterlagmeter.cpp13
-rw-r--r--indra/newview/llfloaterlagmeter.h9
-rw-r--r--indra/newview/llfloaterpreference.cpp5
-rw-r--r--indra/newview/llmoveview.cpp60
-rw-r--r--indra/newview/llmoveview.h20
-rw-r--r--indra/newview/llnetmap.cpp6
-rw-r--r--indra/newview/lltexturefetch.cpp47
-rw-r--r--indra/newview/llvieweraudio.h6
-rw-r--r--indra/newview/llviewermenu.cpp10
-rw-r--r--indra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp1
-rw-r--r--indra/newview/llvovolume.cpp18
-rw-r--r--indra/newview/llworld.cpp6
-rwxr-xr-xindra/newview/viewer_manifest.py4
30 files changed, 269 insertions, 216 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index 067dc4fc43..d034334aab 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -78,6 +78,7 @@ BOOL LLApp::sLogInSignal = FALSE;
// static
LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status
LLAppErrorHandler LLApp::sErrorHandler = NULL;
+LLAppErrorHandler LLApp::sSyncErrorHandler = NULL;
BOOL LLApp::sErrorThreadRunning = FALSE;
#if !LL_WINDOWS
LLApp::child_map LLApp::sChildMap;
@@ -275,6 +276,21 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler)
LLApp::sErrorHandler = handler;
}
+
+void LLApp::setSyncErrorHandler(LLAppErrorHandler handler)
+{
+ LLApp::sSyncErrorHandler = handler;
+}
+
+// static
+void LLApp::runSyncErrorHandler()
+{
+ if (LLApp::sSyncErrorHandler)
+ {
+ LLApp::sSyncErrorHandler();
+ }
+}
+
// static
void LLApp::runErrorHandler()
{
@@ -298,7 +314,13 @@ void LLApp::setStatus(EAppStatus status)
// static
void LLApp::setError()
{
- setStatus(APP_STATUS_ERROR);
+ if (!isError())
+ {
+ // perform any needed synchronous error-handling
+ runSyncErrorHandler();
+ // set app status to ERROR so that the LLErrorThread notices
+ setStatus(APP_STATUS_ERROR);
+ }
}
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index c199601c20..c5a1546883 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -190,6 +190,7 @@ public:
// Error handling methods
//
void setErrorHandler(LLAppErrorHandler handler);
+ void setSyncErrorHandler(LLAppErrorHandler handler);
#if !LL_WINDOWS
//
@@ -246,13 +247,15 @@ protected:
private:
void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions)
- static void runErrorHandler();
+ static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
+ static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread.
// *NOTE: On Windows, we need a routine to reset the structured
// exception handler when some evil driver has taken it over for
// their own purposes
typedef int(*signal_handler_func)(int signum);
static LLAppErrorHandler sErrorHandler;
+ static LLAppErrorHandler sSyncErrorHandler;
// Default application threads
LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 8e964d3891..c586acc7d9 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -33,9 +33,9 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 1;
-const S32 LL_VERSION_MINOR = 19;
-const S32 LL_VERSION_PATCH = 1;
-const S32 LL_VERSION_BUILD = 84396;
+const S32 LL_VERSION_MINOR = 20;
+const S32 LL_VERSION_PATCH = 0;
+const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Release";
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 01c590c1f3..43c3d85679 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -319,5 +319,21 @@
<string>LoginPage</string>
</map>
+ <key>qa</key>
+ <map>
+ <key>desc</key>
+ <string>Activated debugging menu in Advanced Settings.</string>
+ <key>map-to</key>
+ <string>QAMode</string>
+ </map>
+
+ <key>crashonstartup</key>
+ <map>
+ <key>desc</key>
+ <string>Crashes on startup. For QA use.</string>
+ <key>map-to</key>
+ <string>CrashOnStartup</string>
+ </map>
+
</map>
</llsd>
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 7b9e4ff828..bd9b30a075 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -86,7 +86,7 @@ void main()
color.rgb = mix(mix(fogCol.rgb, fb.rgb, fogCol.a), refcol.rgb, df);
color.rgb += spec * specular;
- color.rgb = applyWaterFog(color);//atmosTransport(color.rgb);
+ //color.rgb = applyWaterFog(color);//atmosTransport(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
color.a = spec * sunAngle2;
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 5f81027b10..032d9bfdc3 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -250,6 +250,9 @@ RenderMaxPartCount 1 2048
RenderTerrainDetail 1 0
RenderVBOEnable 1 1
+list SiS
+UseOcclusion 0 0
+
list Intel_830M
RenderTerrainDetail 1 0
@@ -320,10 +323,25 @@ list Intel_Springdale
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
+
list ATI_FireGL_5200
RenderVBOEnable 1 0
WindLightUseAtmosShaders 0 0
+
+list ATI_Mobility_Radeon_7xxx
+RenderVBOEnable 0 0
+
+list ATI_Radeon_7xxx
+RenderVBOEnable 0 0
+
+list ATI_All-in-Wonder_Radeon
+RenderVBOEnable 0 0
+
+list ATI_All-in-Wonder_7500
+RenderVBOEnable 0 0
+
+
list ATI_Mobility_Radeon_9800
RenderAvatarCloth 0 0
VertexShaderEnable 0 0
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index c75edc8565..842e1afaad 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -22,12 +22,16 @@
3Dfx .*3Dfx.* 0 0
3Dlabs .*3Dlabs.* 0 0
ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0
-ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1
+ATI All-in-Wonder 7500 .*ATI.*All-in-Wonder 75.* 0 1
+ATI All-in-Wonder 8500 .*ATI.*All-in-Wonder 85.* 0 1
+ATI All-in-Wonder 9200 .*ATI.*All-in-Wonder 92.* 0 1
ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1
ATI All-in-Wonder X600 .*ATI.*All-in-Wonder X6.* 1 1
ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 2 1
ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1
ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1
+ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1
+ATI All-in-Wonder Radeon .*ATI.*All-in-Wonder Radeon.* 0 1
ATI ASUS A9xxx .*ATI.*ASUS.*A9.* 1 1
ATI ASUS AH24xx .*ATI.*ASUS.*AH24.* 1 1
ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 3 1
@@ -52,6 +56,8 @@ ATI M52 .*ATI.*M52.* 1 1
ATI M54 .*ATI.*M54.* 1 1
ATI M56 .*ATI.*M56.* 1 1
ATI M76 .*ATI.*M76.* 3 1
+ATI Mobility Radeon 7xxx .*ATI.*Mobility.*Radeon 7.* 0 1
+ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
@@ -70,8 +76,8 @@ ATI Radeon HD 3400 .*ATI.*Radeon HD 34.* 1 1
ATI Radeon HD 3600 .*ATI.*Radeon HD 36.* 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD 38.* 3 1
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0
-ATI Radeon 7000 .*ATI.*Radeon 7.* 0 1
-ATI Radeon 8000 .*ATI.*Radeon 8.* 0 1
+ATI Radeon 7xxx .*ATI.*Radeon 7.* 0 1
+ATI Radeon 8xxx .*ATI.*Radeon 8.* 0 1
ATI Radeon 9000 .*ATI.*Radeon 90.* 0 1
ATI Radeon 9100 .*ATI.*Radeon 91.* 0 1
ATI Radeon 9200 .*ATI.*Radeon 92.* 0 1
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3d10eda7fd..b360d9a8e5 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -152,6 +152,7 @@
#include "llvieweraudio.h"
#include "llimview.h"
#include "llviewerthrottle.h"
+#include "llparcel.h"
//
#include "llinventoryview.h"
@@ -1563,6 +1564,12 @@ bool LLAppViewer::initConfiguration()
llinfos << "Command line usage:\n" << clp << llendl;
}
+ // If we have specified crash on startup, might as well do it now.
+ if(clp.hasOption("crashonstartup"))
+ {
+ LLAppViewer::instance()->forceErrorLLError();
+ }
+
// If the user has specified a alternate settings file name.
// Load it now.
if(clp.hasOption("settings"))
@@ -2136,6 +2143,13 @@ void LLAppViewer::writeSystemInfo()
llinfos << "OS info: " << getOSInfo() << llendl;
}
+void LLAppViewer::handleSyncViewerCrash()
+{
+ LLAppViewer* pApp = LLAppViewer::instance();
+ // Call to pure virtual, handled by platform specific llappviewer instance.
+ pApp->handleSyncCrashTrace();
+}
+
void LLAppViewer::handleViewerCrash()
{
LLAppViewer* pApp = LLAppViewer::instance();
@@ -2161,6 +2175,17 @@ void LLAppViewer::handleViewerCrash()
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
+
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if ( parcel && parcel->getMusicURL()[0])
+ {
+ gDebugInfo["ParcelMusicURL"] = parcel->getMusicURL();
+ }
+ if ( parcel && parcel->getMediaURL()[0])
+ {
+ gDebugInfo["ParcelMediaURL"] = parcel->getMediaURL();
+ }
+
gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
@@ -2236,7 +2261,7 @@ void LLAppViewer::handleViewerCrash()
pApp->removeMarkerFile(false);
}
- // Call to pure virtual, handled by platform specifc llappviewer instance.
+ // Call to pure virtual, handled by platform specific llappviewer instance.
pApp->handleCrashReporting();
return;
@@ -2806,6 +2831,7 @@ void LLAppViewer::badNetworkHandler()
// Generates the minidump.
LLWinDebug::handleException(NULL);
#endif
+ LLAppViewer::handleSyncViewerCrash();
LLAppViewer::handleViewerCrash();
std::ostringstream message;
@@ -2839,7 +2865,8 @@ void LLAppViewer::saveFinalSnapshot()
LLString snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_LAST_FILENAME;
- gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, TRUE);
+ // use full pixel dimensions of viewer window (not post-scale dimensions)
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, TRUE);
mSavedFinalSnapshot = TRUE;
}
}
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index c36dd2955e..d7a8e66a4b 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -39,27 +39,41 @@
#include "llviewernetwork.h"
#include "llmd5.h"
- #if LL_LINUX
- # include <dlfcn.h> // RTLD_LAZY
- # include <execinfo.h> // backtrace - glibc only
- # ifndef LL_ELFBIN
- #define LL_ELFBIN 1
- # endif // LL_ELFBIN
- # if LL_ELFBIN
- # include <cxxabi.h> // for symbol demangling
- # include "ELFIO.h" // for better backtraces
- # endif // LL_ELFBIN
- #elif LL_SOLARIS
- # include <sys/types.h>
- # include <unistd.h>
- # include <fcntl.h>
- # include <ucontext.h>
- #endif
+#include <exception>
+
+#if LL_LINUX
+# include <dlfcn.h> // RTLD_LAZY
+# include <execinfo.h> // backtrace - glibc only
+# ifndef LL_ELFBIN
+# define LL_ELFBIN 1
+# endif // LL_ELFBIN
+# if LL_ELFBIN
+# include <cxxabi.h> // for symbol demangling
+# include "ELFIO.h" // for better backtraces
+# endif // LL_ELFBIN
+#elif LL_SOLARIS
+# include <sys/types.h>
+# include <unistd.h>
+# include <fcntl.h>
+# include <ucontext.h>
+#endif
namespace
{
int gArgC = 0;
char **gArgV = NULL;
+ void (*gOldTerminateHandler)() = NULL;
+}
+
+static void exceptionTerminateHandler()
+{
+ // reinstall default terminate() handler in case we re-terminate.
+ if (gOldTerminateHandler) std::set_terminate(gOldTerminateHandler);
+ // treat this like a regular viewer crash, with nice stacktrace etc.
+ LLAppViewer::handleSyncViewerCrash();
+ LLAppViewer::handleViewerCrash();
+ // we've probably been killed-off before now, but...
+ gOldTerminateHandler(); // call old terminate() handler
}
int main( int argc, char **argv )
@@ -75,7 +89,11 @@ int main( int argc, char **argv )
LLAppViewer* viewer_app_ptr = new LLAppViewerLinux();
+ // install unexpected exception handler
+ gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
+ // install crash handlers
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
+ viewer_app_ptr->setSyncErrorHandler(LLAppViewer::handleSyncViewerCrash);
bool ok = viewer_app_ptr->init();
if(!ok)
@@ -301,19 +319,22 @@ bool LLAppViewerLinux::init()
return LLAppViewer::init();
}
-void LLAppViewerLinux::handleCrashReporting()
+void LLAppViewerLinux::handleSyncCrashTrace()
{
+ // This backtrace writes into stack_trace.log
+# if LL_ELFBIN
+ do_elfio_glibc_backtrace(); // more useful backtrace
+# else
+ do_basic_glibc_backtrace(); // only slightly useful backtrace
+# endif // LL_ELFBIN
+}
+void LLAppViewerLinux::handleCrashReporting()
+{
// Always generate the report, have the logger do the asking, and
// don't wait for the logger before exiting (-> total cleanup).
if (CRASH_BEHAVIOR_NEVER_SEND != LLAppViewer::instance()->getCrashBehavior())
{
- // This backtrace writes into stack_trace.log
-# if LL_ELFBIN
- do_elfio_glibc_backtrace(); // more useful backtrace
-# else
- do_basic_glibc_backtrace(); // only slightly useful backtrace
-# endif // LL_ELFBIN
// launch the actual crash logger
char* ask_dialog = "-dialog";
if (CRASH_BEHAVIOR_ASK != LLAppViewer::instance()->getCrashBehavior())
@@ -329,6 +350,7 @@ void LLAppViewerLinux::handleCrashReporting()
(char*)"-name",
(char*)LLAppViewer::instance()->getSecondLifeTitle().c_str(),
NULL};
+ fflush(NULL);
pid_t pid = fork();
if (pid == 0)
{ // child
@@ -352,9 +374,10 @@ void LLAppViewerLinux::handleCrashReporting()
}
}
}
- // Sometimes signals don't seem to quit the viewer.
+ // Sometimes signals don't seem to quit the viewer. Also, we may
+ // have been called explicitly instead of from a signal handler.
// Make sure we exit so as to not totally confuse the user.
- exit(1);
+ _exit(1); // avoid atexit(), else we may re-crash in dtors.
}
bool LLAppViewerLinux::beingDebugged()
diff --git a/indra/newview/llappviewerlinux.h b/indra/newview/llappviewerlinux.h
index ce91b6b8b6..300cb10e2d 100644
--- a/indra/newview/llappviewerlinux.h
+++ b/indra/newview/llappviewerlinux.h
@@ -54,6 +54,7 @@ protected:
virtual bool beingDebugged();
virtual void handleCrashReporting();
+ virtual void handleSyncCrashTrace();
virtual bool initLogging();
virtual bool initParseCommandLine(LLCommandLineParser& clp);
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 1e4c08a1c1..a748545a3b 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -160,6 +160,11 @@ bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)
return true;
}
+void LLAppViewerMacOSX::handleSyncCrashTrace()
+{
+ // do nothing
+}
+
void LLAppViewerMacOSX::handleCrashReporting()
{
// Macintosh
diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h
index cc4a7f5eb5..644c2e0551 100644
--- a/indra/newview/llappviewermacosx.h
+++ b/indra/newview/llappviewermacosx.h
@@ -50,8 +50,10 @@ public:
protected:
virtual void handleCrashReporting();
+ virtual void handleSyncCrashTrace();
+
std::string generateSerialNumber();
- virtual bool initParseCommandLine(LLCommandLineParser& clp);
+ virtual bool initParseCommandLine(LLCommandLineParser& clp);
};
#endif // LL_LLAPPVIEWERMACOSX_H
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 143c9cece4..3770fe2a33 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -388,6 +388,11 @@ bool LLAppViewerWin32::initParseCommandLine(LLCommandLineParser& clp)
return clp.parseCommandLineString(mCmdLine);
}
+void LLAppViewerWin32::handleSyncCrashTrace()
+{
+ // do nothing
+}
+
void LLAppViewerWin32::handleCrashReporting()
{
// Windows only behaivor. Spawn win crash reporter.
diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h
index 66653c48f5..d8a79a8b7a 100644
--- a/indra/newview/llappviewerwin32.h
+++ b/indra/newview/llappviewerwin32.h
@@ -51,9 +51,10 @@ public:
protected:
virtual void initConsole(); // Initialize OS level debugging console.
virtual bool initHardwareTest(); // Win32 uses DX9 to test hardware.
- virtual bool initParseCommandLine(LLCommandLineParser& clp);
+ virtual bool initParseCommandLine(LLCommandLineParser& clp);
- virtual void handleCrashReporting();
+ virtual void handleCrashReporting();
+ virtual void handleSyncCrashTrace();
std::string generateSerialNumber();
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 4aeb1d74bf..dc160a29ac 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -108,9 +108,8 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
mFloaterStatsp->setFollowsTop();
mFloaterStatsp->setFollowsRight();
- // Default to off
- mFloaterStatsp->setVisible(FALSE);
- addChild(mFloaterStatsp);
+ // since this is a floater, it belongs to LLFloaterView
+ //addChild(mFloaterStatsp);
const S32 VELOCITY_LEFT = 10; // 370;
const S32 VELOCITY_WIDTH = 500;
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 6bc14b331b..ab85a8c3c1 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -43,21 +43,17 @@
// Constants
const F32 CAMERA_BUTTON_DELAY = 0.0f;
-// Globals
-LLFloaterCamera* gFloaterCamera = NULL;
-
-
//
// Member functions
//
-LLFloaterCamera::LLFloaterCamera(const std::string& name)
-: LLFloater(name) // uses "FloaterCameraRect3"
+LLFloaterCamera::LLFloaterCamera(const LLSD& val)
+: LLFloater("camera floater") // uses "FloaterCameraRect3"
{
setIsChrome(TRUE);
- // For now, only used for size and tooltip strings
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml");
+ const BOOL DONT_OPEN = FALSE;
+ LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", NULL, DONT_OPEN);
S32 top = getRect().getHeight();
S32 bottom = 0;
@@ -103,11 +99,12 @@ LLFloaterCamera::LLFloaterCamera(const std::string& name)
addChild(mTrack);
}
-
-LLFloaterCamera::~LLFloaterCamera()
+// virtual
+void LLFloaterCamera::onOpen()
{
- // children all deleted by LLView destructor
- gFloaterCamera = NULL;
+ LLFloater::onOpen();
+
+ gSavedSettings.setBOOL("ShowCameraControls", TRUE);
}
// virtual
@@ -119,45 +116,4 @@ void LLFloaterCamera::onClose(bool app_quitting)
{
gSavedSettings.setBOOL("ShowCameraControls", FALSE);
}
-}
-
-//
-// Static member functions
-//
-
-// static
-void LLFloaterCamera::show(void*)
-{
- if(!gFloaterCamera)
- {
- gFloaterCamera = new LLFloaterCamera("camera floater");
- }
- gFloaterCamera->open(); /* Flawfinder: ignore */
- gSavedSettings.setBOOL("ShowCameraControls", TRUE);
-}
-
-// static
-void LLFloaterCamera::toggle(void*)
-{
- if (gFloaterCamera)
- {
- gFloaterCamera->close();
- }
- else
- {
- show(NULL);
- }
-}
-
-// static
-BOOL LLFloaterCamera::visible(void*)
-{
- if (gFloaterCamera)
- {
- return gFloaterCamera->getVisible();
- }
- else
- {
- return FALSE;
- }
-}
+} \ No newline at end of file
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 1213d436cc..b70ae9a227 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -49,9 +49,7 @@ const LLString LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga";
const LLString LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
const LLString LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
-LLFloaterLagMeter * LLFloaterLagMeter::sInstance = NULL;
-
-LLFloaterLagMeter::LLFloaterLagMeter()
+LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
: LLFloater("floater_lagmeter")
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
@@ -127,8 +125,6 @@ LLFloaterLagMeter::LLFloaterLagMeter()
LLFloaterLagMeter::~LLFloaterLagMeter()
{
- sInstance = NULL;
-
// save shrunk status for next time
gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
// expand so we save the large window rectangle
@@ -147,13 +143,6 @@ void LLFloaterLagMeter::draw()
LLFloater::draw();
}
-//static
-void LLFloaterLagMeter::show(void *data)
-{
- if(!sInstance) sInstance = new LLFloaterLagMeter();
- sInstance->open();
-}
-
void LLFloaterLagMeter::determineClient()
{
F32 client_frame_time = LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
index 83603826c4..6a034c840c 100644
--- a/indra/newview/llfloaterlagmeter.h
+++ b/indra/newview/llfloaterlagmeter.h
@@ -34,14 +34,15 @@
#include "llfloater.h"
-class LLFloaterLagMeter : public LLFloater
+class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterLagMeter>
{
+ friend class LLUISingleton<LLFloaterLagMeter, VisibilityPolicy<LLFloater> >;
+
public:
/*virtual*/ void draw();
- static void show(void*);
private:
- LLFloaterLagMeter();
+ LLFloaterLagMeter(const LLSD& key);
/*virtual*/ ~LLFloaterLagMeter();
void determineClient();
@@ -75,8 +76,6 @@ private:
LLTextBox * mServerCause;
LLString::format_map_t mStringArgs;
-
- static LLFloaterLagMeter * sInstance;
};
#endif
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 1ad58f2706..e66d545409 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -192,7 +192,10 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def
mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer);
mMsgPanel->setDefaultBtn(default_btn);
- mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab"));
+ if (!mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
+ {
+ mTabContainer->selectFirstTab();
+ }
}
LLPreferenceCore::~LLPreferenceCore()
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index a73da0940e..4819d5bd10 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -53,22 +53,17 @@ const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed
const F32 NUDGE_TIME = 0.25f; // in seconds
//
-// Global statics
-//
-
-LLFloaterMove* LLFloaterMove::sInstance = NULL;
-
-
-//
// Member functions
//
// protected
-LLFloaterMove::LLFloaterMove()
+LLFloaterMove::LLFloaterMove(const LLSD& key)
: LLFloater("move floater")
{
setIsChrome(TRUE);
- LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml");
+
+ const BOOL DONT_OPEN = FALSE;
+ LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", NULL, DONT_OPEN);
mForwardButton = getChild<LLJoystickAgentTurn>("forward btn");
mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
@@ -99,15 +94,6 @@ LLFloaterMove::LLFloaterMove()
childSetAction("move down btn",moveDown,NULL);
mMoveDownButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
mMoveDownButton->setHeldDownCallback( moveDown );
-
- sInstance = this;
-}
-
-// protected
-LLFloaterMove::~LLFloaterMove()
-{
- // children all deleted by LLView destructor
- sInstance = NULL;
}
// virtual
@@ -125,42 +111,12 @@ void LLFloaterMove::onClose(bool app_quitting)
// Static member functions
//
-// static
-void LLFloaterMove::show(void*)
+void LLFloaterMove::onOpen()
{
- if (sInstance)
- {
- sInstance->open(); /*Flawfinder: ignore*/
- }
- else
- {
- LLFloaterMove* f = new LLFloaterMove();
- f->open(); /*Flawfinder: ignore*/
- }
-
+ LLFloater::onOpen();
gSavedSettings.setBOOL("ShowMovementControls", TRUE);
}
-// static
-void LLFloaterMove::toggle(void*)
-{
- if (sInstance)
- {
- sInstance->close();
- }
- else
- {
- show(NULL);
- }
-}
-
-// static
-BOOL LLFloaterMove::visible(void*)
-{
- return (sInstance != NULL);
-}
-
-
// protected static
F32 LLFloaterMove::getYawRate( F32 time )
{
@@ -178,14 +134,14 @@ F32 LLFloaterMove::getYawRate( F32 time )
// protected static
void LLFloaterMove::turnLeft(void *)
{
- F32 time = sInstance->mTurnLeftButton->getHeldDownTime();
+ F32 time = getInstance()->mTurnLeftButton->getHeldDownTime();
gAgent.moveYaw( getYawRate( time ) );
}
// protected static
void LLFloaterMove::turnRight(void *)
{
- F32 time = sInstance->mTurnRightButton->getHeldDownTime();
+ F32 time = getInstance()->mTurnRightButton->getHeldDownTime();
gAgent.moveYaw( -getYawRate( time ) );
}
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index 4d55206194..17005e0ded 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -43,24 +43,21 @@ class LLJoystickAgentSlide;
// Classes
//
class LLFloaterMove
-: public LLFloater
+: public LLFloater,
+ public LLFloaterSingleton<LLFloaterMove>
{
+ friend class LLUISingleton<LLFloaterMove, VisibilityPolicy<LLFloater> >;
+
protected:
- LLFloaterMove();
- ~LLFloaterMove();
+ LLFloaterMove(const LLSD& key);
+ ~LLFloaterMove() {}
public:
+ /*virtual*/ void onOpen();
/*virtual*/ void onClose(bool app_quitting);
static F32 getYawRate(F32 time);
- static void show(void*);
- static void toggle(void*);
- static BOOL visible(void*);
-
- // This function is used for agent-driven button highlighting
- static LLFloaterMove* getInstance() { return sInstance; }
-
protected:
static void turnLeftNudge(void* userdata);
static void turnLeft(void* userdata);
@@ -80,9 +77,6 @@ public:
LLButton* mTurnRightButton;
LLButton* mMoveUpButton;
LLButton* mMoveDownButton;
-
-protected:
- static LLFloaterMove* sInstance;
};
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 1550751e7f..1b2474728f 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -436,10 +436,12 @@ void LLNetMap::draw()
}
// Draw dot for self avatar position
- //drawTracking( gAgent.getPosGlobalFromAgent(gAgent.getFrameAgent().getCenter()), gSelfMapColor );
pos_global = gAgent.getPositionGlobal();
pos_map = globalPosToView(pos_global);
- LLWorldMapView::sAvatarYouSmallImage->draw(llround(pos_map.mV[VX]) - 4, llround(pos_map.mV[VY]) - 4);
+ LLUIImagePtr you = LLWorldMapView::sAvatarYouSmallImage;
+ you->draw(
+ llround(pos_map.mV[VX]) - you->getWidth()/2,
+ llround(pos_map.mV[VY]) - you->getHeight()/2);
// Draw frustum
F32 meters_to_pixels = gMiniMapScale/ LLWorld::getInstance()->getRegionWidthInMeters();
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 669ea3167e..bcb2185687 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -497,7 +497,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
mDesiredDiscard = discard;
mDesiredSize = size;
}
- else if (size > mDesiredSize || size == 0)
+ else if (size > mDesiredSize)
{
mDesiredSize = size;
prioritize = true;
@@ -594,8 +594,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
U32 cache_priority = mWorkPriority;
S32 offset = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0;
S32 size = mDesiredSize - offset;
-
- if(mDesiredSize != 0 && size <= 0)
+ if (size <= 0)
{
mState = CACHE_POST;
return false;
@@ -640,12 +639,13 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == CACHE_POST)
{
+ mDesiredSize = llmax(mDesiredSize, FIRST_PACKET_SIZE);
mCachedSize = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0;
// Successfully loaded
if ((mCachedSize >= mDesiredSize) || mHaveAllData)
{
// we have enough data, decode it
- llassert_always(mFormattedImage.isNull() || mFormattedImage->getDataSize() > 0);
+ llassert_always(mFormattedImage->getDataSize() > 0);
mState = DECODE_IMAGE;
// fall through
}
@@ -859,7 +859,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == DECODE_IMAGE)
{
- llassert_always(mFormattedImage.isNull() || mFormattedImage->getDataSize() > 0);
+ llassert_always(mFormattedImage->getDataSize() > 0);
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
mRawImage = NULL;
mAuxImage = NULL;
@@ -1311,13 +1311,13 @@ LLTextureFetch::~LLTextureFetch()
}
bool LLTextureFetch::createRequest(const LLUUID& id, const LLHost& host, F32 priority,
- S32 w, S32 h, S32 c, S32 discard, bool needs_aux)
+ S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux)
{
- return createRequest(LLString::null, id, host, priority, w, h, c, discard, needs_aux);
+ return createRequest(LLString::null, id, host, priority, w, h, c, desired_discard, needs_aux);
}
bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, const LLHost& host, F32 priority,
- S32 w, S32 h, S32 c, S32 discard, bool needs_aux)
+ S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux)
{
if (mDebugPause)
{
@@ -1341,7 +1341,7 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c
}
S32 desired_size;
- if ((discard == 0) && worker && worker->mFileSize)
+ if ((desired_discard == 0) && worker && worker->mFileSize)
{
// if we want the entire image, and we know its size, then get it all
// (calcDataSizeJ2C() below makes assumptions about how the image
@@ -1349,24 +1349,25 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c
// we really do get it.)
desired_size = worker->mFileSize;
}
- //else if ((discard == 0) && worker == NULL)
- //{
- // // if we want the entire image, but we don't know its size, then send
- // // a sentinel value of zero to request the entire contents of the cache.
- // // patch supplied by resident Sheet Spotter for VWR-2404
- // desired_size = 0;
- //}
else if (w*h*c > 0)
{
// If the requester knows the dimentions of the image,
// this will calculate how much data we need without having to parse the header
- desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, discard);
+ desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, desired_discard);
}
else
{
- desired_size = FIRST_PACKET_SIZE;
- discard = MAX_DISCARD_LEVEL;
+ if (desired_discard == 0)
+ {
+ // If we want all of the image, request the maximum possible data
+ desired_size = MAX_IMAGE_DATA_SIZE;
+ }
+ else
+ {
+ desired_size = FIRST_PACKET_SIZE;
+ desired_discard = MAX_DISCARD_LEVEL;
+ }
}
if (worker)
{
@@ -1376,7 +1377,7 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c
}
worker->lockWorkData();
worker->setImagePriority(priority);
- worker->setDesiredDiscard(discard, desired_size);
+ worker->setDesiredDiscard(desired_discard, desired_size);
worker->unlockWorkData();
if (!worker->haveWork())
{
@@ -1389,18 +1390,18 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c
if (filename.empty())
{
// do remote fetch
- worker = new LLTextureFetchWorker(this, id, host, priority, discard, desired_size);
+ worker = new LLTextureFetchWorker(this, id, host, priority, desired_discard, desired_size);
}
else
{
// do local file fetch
- worker = new LLTextureFetchLocalFileWorker(this, filename, id, host, priority, discard, desired_size);
+ worker = new LLTextureFetchLocalFileWorker(this, filename, id, host, priority, desired_discard, desired_size);
}
mRequestMap[id] = worker;
}
worker->mActiveCount++;
worker->mNeedsAux = needs_aux;
-// llinfos << "REQUESTED: " << id << " Discard: " << discard << llendl;
+// llinfos << "REQUESTED: " << id << " Discard: " << desired_discard << llendl;
return true;
}
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index 64090d24e6..0b0fafecc5 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -32,6 +32,12 @@
#ifndef LL_VIEWERAUDIO_H
#define LL_VIEWERAUDIO_H
+// comment out to turn off wind
+#define kAUDIO_ENABLE_WIND
+//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water
+#define kAUDIO_NUM_BUFFERS 30
+#define kAUDIO_NUM_SOURCES 30
+
void init_audio();
void audio_update_volume(bool force_update = true);
void audio_update_listener();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index ec52118098..ac361fa80b 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5360,11 +5360,11 @@ class LLShowFloater : public view_listener_t
}
else if (floater_name == "camera controls")
{
- LLFloaterCamera::toggle(NULL);
+ LLFloaterCamera::toggleInstance();
}
else if (floater_name == "movement controls")
{
- LLFloaterMove::show(NULL);
+ LLFloaterMove::toggleInstance();
}
else if (floater_name == "world map")
{
@@ -5435,7 +5435,7 @@ class LLShowFloater : public view_listener_t
}
else if (floater_name == "lag meter")
{
- LLFloaterLagMeter::show(NULL);
+ LLFloaterLagMeter::showInstance();
}
else if (floater_name == "bug reporter")
{
@@ -5488,11 +5488,11 @@ class LLFloaterVisible : public view_listener_t
}
else if (floater_name == "camera controls")
{
- new_value = LLFloaterCamera::visible(NULL);
+ new_value = LLFloaterCamera::instanceVisible();
}
else if (floater_name == "movement controls")
{
- new_value = LLFloaterMove::visible(NULL);
+ new_value = LLFloaterMove::instanceVisible();
}
else if (floater_name == "stat bar")
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 439063e439..99f1af61e5 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -36,7 +36,6 @@
#include <deque>
#include "audioengine.h"
-#include "audiosettings.h"
#include "indra_constants.h"
#include "lscript_byteformat.h"
#include "mean_collision_data.h"
@@ -68,6 +67,7 @@
#include "llagent.h"
#include "llcallingcard.h"
#include "llconsole.h"
+#include "llvieweraudio.h"
#include "llviewercontrol.h"
#include "lldrawpool.h"
#include "llfirstuse.h"
@@ -4069,7 +4069,7 @@ void process_alert_core(const std::string& message, BOOL modal)
LLString snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_HOME_FILENAME;
- gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, FALSE);
}
const std::string ALERT_PREFIX("ALERT: ");
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 696a2ad3c6..52b10a2fd9 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1992,7 +1992,6 @@ LLViewerWindow::~LLViewerWindow()
// Automatically deleted as children of mRootView. Fix the globals.
gFloaterTools = NULL;
gStatusBar = NULL;
- gFloaterCamera = NULL;
gIMMgr = NULL;
gHoverView = NULL;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2b8cf93b2d..ce4a660682 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -741,7 +741,23 @@ void LLVOVolume::sculpt()
S32 current_discard = getVolume()->getSculptLevel();
- llassert_always(current_discard >= -2 && current_discard <= max_discard);
+ if(current_discard < -2)
+ {
+ llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
+ << " is less than -2." << llendl;
+
+ // corrupted volume... don't update the sculpty
+ return;
+ }
+ else if (current_discard > max_discard)
+ {
+ llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
+ << " is more than than allowed max of " << max_discard << llendl;
+
+ // corrupted volume... don't update the sculpty
+ return;
+ }
+
if (current_discard == discard_level) // no work to do here
return;
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index ca947bed97..e45b929b6f 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -118,7 +118,11 @@ LLWorld::LLWorld()
void LLWorld::destroyClass()
{
gObjectList.destroy();
- for_each(mRegionList.begin(), mRegionList.end(), DeletePointer());
+ for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); )
+ {
+ LLViewerRegion* region_to_delete = *region_it++;
+ removeRegion(region_to_delete->getHost());
+ }
LLViewerPartSim::getInstance()->destroyClass();
}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index edb7002584..b147b471fa 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -116,7 +116,7 @@ class ViewerManifest(LLManifest):
if self.default_channel():
# beta grid viewer
channel_flags = '--settings settings_beta.xml'
- grid_flags = "--helperuri http://preview-%(grid)s.secondlife.com/helpers/ --loginuri https://login.%(grid)s.lindenlab.com/cgi-bin/login.cgi" % {'grid':self.args['grid']}
+ grid_flags = "--grid %(grid)s --helperuri http://preview-%(grid)s.secondlife.com/helpers/" % {'grid':self.args['grid']}
if not self.default_channel():
# some channel on some grid
@@ -438,7 +438,7 @@ class LinuxManifest(ViewerManifest):
def construct(self):
super(LinuxManifest, self).construct()
self.path("licenses-linux.txt","licenses.txt")
- #self.path("res/ll_icon.ico","secondlife.ico")
+ self.path("res/ll_icon.png","secondlife_icon.png")
if self.prefix("linux_tools", ""):
self.path("client-readme.txt","README-linux.txt")
self.path("client-readme-voice.txt","README-linux-voice.txt")