diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index d034334aab9bc6d9427cff4c211b12bf11cf9dcc..067dc4fc43b953962dc7aea142637d7360e6bfca 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -78,7 +78,6 @@ 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; @@ -276,21 +275,6 @@ 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() { @@ -314,13 +298,7 @@ void LLApp::setStatus(EAppStatus status) // static void LLApp::setError() { - if (!isError()) - { - // perform any needed synchronous error-handling - runSyncErrorHandler(); - // set app status to ERROR so that the LLErrorThread notices - setStatus(APP_STATUS_ERROR); - } + setStatus(APP_STATUS_ERROR); } diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index c5a1546883bf5c08ab909d75cf99b3e5c42ebf41..c199601c2006b80106987455a3b4413faffa8c81 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -190,7 +190,6 @@ class LLApp // Error handling methods // void setErrorHandler(LLAppErrorHandler handler); - void setSyncErrorHandler(LLAppErrorHandler handler); #if !LL_WINDOWS // @@ -247,15 +246,13 @@ class LLApp private: void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions) - 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. + static void runErrorHandler(); // *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 c586acc7d9f24b2cc2878a73e0f807948058129d..8e964d389166d5a3950683e3ec7c9c7e1e2c9109 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 = 20; -const S32 LL_VERSION_PATCH = 0; -const S32 LL_VERSION_BUILD = 0; +const S32 LL_VERSION_MINOR = 19; +const S32 LL_VERSION_PATCH = 1; +const S32 LL_VERSION_BUILD = 84396; 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 43c3d8567994de77797cde99ea5b82a58ff7444f..01c590c1f33e4f1e3c3e52f2ce9c0d3498d29f30 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -319,21 +319,5 @@ <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 bd9b30a07568a3198c68d5493c541d3b4903fa94..7b9e4ff828de1058d3c8b0d5b9ce8114f2e141fd 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 032d9bfdc36ff9454edcd7ae2fa05a964a686f91..5f81027b104ddfbe69ea1c5a8214e70a79c48b99 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -250,9 +250,6 @@ RenderMaxPartCount 1 2048 RenderTerrainDetail 1 0 RenderVBOEnable 1 1 -list SiS -UseOcclusion 0 0 - list Intel_830M RenderTerrainDetail 1 0 @@ -323,25 +320,10 @@ 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 842e1afaadc51795a57ba3abd1568cd1c914eb17..c75edc856523e0b16e9e1c0b3b06c7187e514831 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -22,16 +22,12 @@ 3Dfx .*3Dfx.* 0 0 3Dlabs .*3Dlabs.* 0 0 ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0 -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 PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 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 @@ -56,8 +52,6 @@ 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 @@ -76,8 +70,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 7xxx .*ATI.*Radeon 7.* 0 1 -ATI Radeon 8xxx .*ATI.*Radeon 8.* 0 1 +ATI Radeon 7000 .*ATI.*Radeon 7.* 0 1 +ATI Radeon 8000 .*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 b360d9a8e5de08f159acf6c40c47ee5ed4af0d94..3d10eda7fd2f652cdbc62259f73f92c3e470e4c2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -152,7 +152,6 @@ #include "llvieweraudio.h" #include "llimview.h" #include "llviewerthrottle.h" -#include "llparcel.h" // #include "llinventoryview.h" @@ -1564,12 +1563,6 @@ 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")) @@ -2143,13 +2136,6 @@ 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(); @@ -2175,17 +2161,6 @@ 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(); @@ -2261,7 +2236,7 @@ void LLAppViewer::handleViewerCrash() pApp->removeMarkerFile(false); } - // Call to pure virtual, handled by platform specific llappviewer instance. + // Call to pure virtual, handled by platform specifc llappviewer instance. pApp->handleCrashReporting(); return; @@ -2831,7 +2806,6 @@ void LLAppViewer::badNetworkHandler() // Generates the minidump. LLWinDebug::handleException(NULL); #endif - LLAppViewer::handleSyncViewerCrash(); LLAppViewer::handleViewerCrash(); std::ostringstream message; @@ -2865,8 +2839,7 @@ void LLAppViewer::saveFinalSnapshot() LLString snap_filename = gDirUtilp->getLindenUserDir(); snap_filename += gDirUtilp->getDirDelimiter(); snap_filename += SCREEN_LAST_FILENAME; - // use full pixel dimensions of viewer window (not post-scale dimensions) - gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, TRUE); + gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, TRUE); mSavedFinalSnapshot = TRUE; } } diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index d7a8e66a4bebe30df70475536889834ee89fdcd2..c36dd2955e84cd5a95a2f3819370040f527914dc 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -39,41 +39,27 @@ #include "llviewernetwork.h" #include "llmd5.h" -#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 + #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 ) @@ -89,11 +75,7 @@ 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) @@ -319,22 +301,19 @@ bool LLAppViewerLinux::init() return LLAppViewer::init(); } -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()) @@ -350,7 +329,6 @@ void LLAppViewerLinux::handleCrashReporting() (char*)"-name", (char*)LLAppViewer::instance()->getSecondLifeTitle().c_str(), NULL}; - fflush(NULL); pid_t pid = fork(); if (pid == 0) { // child @@ -374,10 +352,9 @@ void LLAppViewerLinux::handleCrashReporting() } } } - // Sometimes signals don't seem to quit the viewer. Also, we may - // have been called explicitly instead of from a signal handler. + // Sometimes signals don't seem to quit the viewer. // Make sure we exit so as to not totally confuse the user. - _exit(1); // avoid atexit(), else we may re-crash in dtors. + exit(1); } bool LLAppViewerLinux::beingDebugged() diff --git a/indra/newview/llappviewerlinux.h b/indra/newview/llappviewerlinux.h index 300cb10e2d23e7731ef237fb8eaa7fdd982366ac..ce91b6b8b644b578d5dbb69d32a132bbe434776a 100644 --- a/indra/newview/llappviewerlinux.h +++ b/indra/newview/llappviewerlinux.h @@ -54,7 +54,6 @@ class LLAppViewerLinux : public LLAppViewer 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 a748545a3bca709243ebd07611ad3a508ae52da5..1e4c08a1c1b70bb9f65593c3d75d9fbe0f6a5517 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -160,11 +160,6 @@ 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 644c2e0551f33c4e5f272cd47a57b3a2becc94c2..cc4a7f5eb5de3981e5b36780fde390b113364f02 100644 --- a/indra/newview/llappviewermacosx.h +++ b/indra/newview/llappviewermacosx.h @@ -50,10 +50,8 @@ class LLAppViewerMacOSX : public LLAppViewer 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 3770fe2a337c678bb1d033933f76f9cbf59156f7..143c9cece4383a8ed331782db7722876fb0baeba 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -388,11 +388,6 @@ 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 d8a79a8b7a30c2b4dc7204ceeb656fb82ffe9cf5..66653c48f5cd3a1344895130a4e944ff96ec2564 100644 --- a/indra/newview/llappviewerwin32.h +++ b/indra/newview/llappviewerwin32.h @@ -51,10 +51,9 @@ class LLAppViewerWin32 : public LLAppViewer 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 handleSyncCrashTrace(); + virtual void handleCrashReporting(); std::string generateSerialNumber(); diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index dc160a29ac13ffa446398520fecd321e1284cd3d..4aeb1d74bfc9d5e80da9bb16445146b447e1b91c 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -108,8 +108,9 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect) mFloaterStatsp->setFollowsTop(); mFloaterStatsp->setFollowsRight(); - // since this is a floater, it belongs to LLFloaterView - //addChild(mFloaterStatsp); + // Default to off + mFloaterStatsp->setVisible(FALSE); + 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 ab85a8c3c165f6e4e097f2ba9539b3efd9e04fd9..6bc14b331b5a1006a3f7a930b91c22b3a26fd310 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -43,17 +43,21 @@ // Constants const F32 CAMERA_BUTTON_DELAY = 0.0f; +// Globals +LLFloaterCamera* gFloaterCamera = NULL; + + // // Member functions // -LLFloaterCamera::LLFloaterCamera(const LLSD& val) -: LLFloater("camera floater") // uses "FloaterCameraRect3" +LLFloaterCamera::LLFloaterCamera(const std::string& name) +: LLFloater(name) // uses "FloaterCameraRect3" { setIsChrome(TRUE); - const BOOL DONT_OPEN = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", NULL, DONT_OPEN); + // For now, only used for size and tooltip strings + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml"); S32 top = getRect().getHeight(); S32 bottom = 0; @@ -99,12 +103,11 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) addChild(mTrack); } -// virtual -void LLFloaterCamera::onOpen() + +LLFloaterCamera::~LLFloaterCamera() { - LLFloater::onOpen(); - - gSavedSettings.setBOOL("ShowCameraControls", TRUE); + // children all deleted by LLView destructor + gFloaterCamera = NULL; } // virtual @@ -116,4 +119,45 @@ void LLFloaterCamera::onClose(bool app_quitting) { gSavedSettings.setBOOL("ShowCameraControls", FALSE); } -} \ No newline at end of file +} + +// +// 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; + } +} diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index b70ae9a2274e844e90d2018ca61e00fb7fd60a0e..1213d436cc25bac8ed764ca1464eb2c873a047cf 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -49,7 +49,9 @@ 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(const LLSD& key) +LLFloaterLagMeter * LLFloaterLagMeter::sInstance = NULL; + +LLFloaterLagMeter::LLFloaterLagMeter() : LLFloater("floater_lagmeter") { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml"); @@ -125,6 +127,8 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) LLFloaterLagMeter::~LLFloaterLagMeter() { + sInstance = NULL; + // save shrunk status for next time gSavedSettings.setBOOL("LagMeterShrunk", mShrunk); // expand so we save the large window rectangle @@ -143,6 +147,13 @@ 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 6a034c840c993456d22053e0a1e36d2f8c8147c7..83603826c4f40516e02209eb7c6adf946347287d 100644 --- a/indra/newview/llfloaterlagmeter.h +++ b/indra/newview/llfloaterlagmeter.h @@ -34,15 +34,14 @@ #include "llfloater.h" -class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterLagMeter> +class LLFloaterLagMeter : public LLFloater { - friend class LLUISingleton<LLFloaterLagMeter, VisibilityPolicy<LLFloater> >; - public: /*virtual*/ void draw(); + static void show(void*); private: - LLFloaterLagMeter(const LLSD& key); + LLFloaterLagMeter(); /*virtual*/ ~LLFloaterLagMeter(); void determineClient(); @@ -76,6 +75,8 @@ class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterL LLTextBox * mServerCause; LLString::format_map_t mStringArgs; + + static LLFloaterLagMeter * sInstance; }; #endif diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e66d5454092bc7da0391effb04ba17abbad39012..1ad58f270646a44aff4cde6b285f142f27485060 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -192,10 +192,7 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mMsgPanel->setDefaultBtn(default_btn); - if (!mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) - { - mTabContainer->selectFirstTab(); - } + mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab")); } LLPreferenceCore::~LLPreferenceCore() diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 4819d5bd10f6494d0d0b36f95cf717af356211f7..a73da0940efe35fdcf7f0558fa9b9e98e6d1f34f 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -52,18 +52,23 @@ const F32 MOVE_BUTTON_DELAY = 0.0f; 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(const LLSD& key) +LLFloaterMove::LLFloaterMove() : LLFloater("move floater") { setIsChrome(TRUE); - - const BOOL DONT_OPEN = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", NULL, DONT_OPEN); + LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml"); mForwardButton = getChild<LLJoystickAgentTurn>("forward btn"); mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY); @@ -94,6 +99,15 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) 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 @@ -111,12 +125,42 @@ void LLFloaterMove::onClose(bool app_quitting) // Static member functions // -void LLFloaterMove::onOpen() +// static +void LLFloaterMove::show(void*) { - LLFloater::onOpen(); + if (sInstance) + { + sInstance->open(); /*Flawfinder: ignore*/ + } + else + { + LLFloaterMove* f = new LLFloaterMove(); + f->open(); /*Flawfinder: ignore*/ + } + 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 ) { @@ -134,14 +178,14 @@ F32 LLFloaterMove::getYawRate( F32 time ) // protected static void LLFloaterMove::turnLeft(void *) { - F32 time = getInstance()->mTurnLeftButton->getHeldDownTime(); + F32 time = sInstance->mTurnLeftButton->getHeldDownTime(); gAgent.moveYaw( getYawRate( time ) ); } // protected static void LLFloaterMove::turnRight(void *) { - F32 time = getInstance()->mTurnRightButton->getHeldDownTime(); + F32 time = sInstance->mTurnRightButton->getHeldDownTime(); gAgent.moveYaw( -getYawRate( time ) ); } diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 17005e0ded7b5542bee8bd8cfc7408d3b5e5ee25..4d552061944da634fb23522a057d23597ffd6cb7 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -43,21 +43,24 @@ class LLJoystickAgentSlide; // Classes // class LLFloaterMove -: public LLFloater, - public LLFloaterSingleton<LLFloaterMove> +: public LLFloater { - friend class LLUISingleton<LLFloaterMove, VisibilityPolicy<LLFloater> >; - protected: - LLFloaterMove(const LLSD& key); - ~LLFloaterMove() {} + LLFloaterMove(); + ~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); @@ -77,6 +80,9 @@ class LLFloaterMove LLButton* mTurnRightButton; LLButton* mMoveUpButton; LLButton* mMoveDownButton; + +protected: + static LLFloaterMove* sInstance; }; diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 1b2474728ff072c0c26c76851745b79f658b50c3..1550751e7f620d894d7095fe03d9ab64dbd6a0ef 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -436,12 +436,10 @@ 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); - LLUIImagePtr you = LLWorldMapView::sAvatarYouSmallImage; - you->draw( - llround(pos_map.mV[VX]) - you->getWidth()/2, - llround(pos_map.mV[VY]) - you->getHeight()/2); + LLWorldMapView::sAvatarYouSmallImage->draw(llround(pos_map.mV[VX]) - 4, llround(pos_map.mV[VY]) - 4); // Draw frustum F32 meters_to_pixels = gMiniMapScale/ LLWorld::getInstance()->getRegionWidthInMeters(); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index bcb2185687002a1e8acceeb8b7f5d77895b96824..669ea3167e17d383bb973042e02d6d607f55d72b 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) + else if (size > mDesiredSize || size == 0) { mDesiredSize = size; prioritize = true; @@ -594,7 +594,8 @@ bool LLTextureFetchWorker::doWork(S32 param) U32 cache_priority = mWorkPriority; S32 offset = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0; S32 size = mDesiredSize - offset; - if (size <= 0) + + if(mDesiredSize != 0 && size <= 0) { mState = CACHE_POST; return false; @@ -639,13 +640,12 @@ 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->getDataSize() > 0); + llassert_always(mFormattedImage.isNull() || mFormattedImage->getDataSize() > 0); mState = DECODE_IMAGE; // fall through } @@ -859,7 +859,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == DECODE_IMAGE) { - llassert_always(mFormattedImage->getDataSize() > 0); + llassert_always(mFormattedImage.isNull() || 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 desired_discard, bool needs_aux) + S32 w, S32 h, S32 c, S32 discard, bool needs_aux) { - return createRequest(LLString::null, id, host, priority, w, h, c, desired_discard, needs_aux); + return createRequest(LLString::null, id, host, priority, w, h, c, discard, needs_aux); } bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux) + S32 w, S32 h, S32 c, S32 discard, bool needs_aux) { if (mDebugPause) { @@ -1341,7 +1341,7 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c } S32 desired_size; - if ((desired_discard == 0) && worker && worker->mFileSize) + if ((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,25 +1349,24 @@ 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, desired_discard); + desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, discard); } else { - 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; - } + desired_size = FIRST_PACKET_SIZE; + discard = MAX_DISCARD_LEVEL; } if (worker) { @@ -1377,7 +1376,7 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c } worker->lockWorkData(); worker->setImagePriority(priority); - worker->setDesiredDiscard(desired_discard, desired_size); + worker->setDesiredDiscard(discard, desired_size); worker->unlockWorkData(); if (!worker->haveWork()) { @@ -1390,18 +1389,18 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c if (filename.empty()) { // do remote fetch - worker = new LLTextureFetchWorker(this, id, host, priority, desired_discard, desired_size); + worker = new LLTextureFetchWorker(this, id, host, priority, discard, desired_size); } else { // do local file fetch - worker = new LLTextureFetchLocalFileWorker(this, filename, id, host, priority, desired_discard, desired_size); + worker = new LLTextureFetchLocalFileWorker(this, filename, id, host, priority, discard, desired_size); } mRequestMap[id] = worker; } worker->mActiveCount++; worker->mNeedsAux = needs_aux; -// llinfos << "REQUESTED: " << id << " Discard: " << desired_discard << llendl; +// llinfos << "REQUESTED: " << id << " Discard: " << discard << llendl; return true; } diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h index 0b0fafecc568c2b72ac34ecdbb44a5554b39d698..64090d24e640c1df8f398f6876c6e53e8fd07f63 100644 --- a/indra/newview/llvieweraudio.h +++ b/indra/newview/llvieweraudio.h @@ -32,12 +32,6 @@ #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 ac361fa80b0d6475cf129e3f56bfffd08f6a5f47..ec521180983f99f54651e16c8e800dfdf17753ac 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::toggleInstance(); + LLFloaterCamera::toggle(NULL); } else if (floater_name == "movement controls") { - LLFloaterMove::toggleInstance(); + LLFloaterMove::show(NULL); } else if (floater_name == "world map") { @@ -5435,7 +5435,7 @@ class LLShowFloater : public view_listener_t } else if (floater_name == "lag meter") { - LLFloaterLagMeter::showInstance(); + LLFloaterLagMeter::show(NULL); } 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::instanceVisible(); + new_value = LLFloaterCamera::visible(NULL); } else if (floater_name == "movement controls") { - new_value = LLFloaterMove::instanceVisible(); + new_value = LLFloaterMove::visible(NULL); } else if (floater_name == "stat bar") { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 99f1af61e5e8ce4c9c8bf90e77091bc9693ecf15..439063e4399f5623be70d4dc6c763e45a664118b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -36,6 +36,7 @@ #include <deque> #include "audioengine.h" +#include "audiosettings.h" #include "indra_constants.h" #include "lscript_byteformat.h" #include "mean_collision_data.h" @@ -67,7 +68,6 @@ #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->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, FALSE); + gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE); } const std::string ALERT_PREFIX("ALERT: "); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 52b10a2fd95474a4cdef1b8c5eef9e4bc7fa0a01..696a2ad3c6ceb0c8e6af03f569a0b312d276a096 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1992,6 +1992,7 @@ 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 ce4a660682c5feb64d4646436ec6be9d8b48af31..2b8cf93b2d9ef87fef56b7d7d9dba060ac947319 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -741,23 +741,7 @@ void LLVOVolume::sculpt() S32 current_discard = getVolume()->getSculptLevel(); - 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; - } - + llassert_always(current_discard >= -2 && current_discard <= max_discard); if (current_discard == discard_level) // no work to do here return; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index e45b929b6fb67c42df04b219ef8c8e5ff023d302..ca947bed977171f689dc1310018e884e180a07da 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -118,11 +118,7 @@ LLWorld::LLWorld() void LLWorld::destroyClass() { gObjectList.destroy(); - for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); ) - { - LLViewerRegion* region_to_delete = *region_it++; - removeRegion(region_to_delete->getHost()); - } + for_each(mRegionList.begin(), mRegionList.end(), DeletePointer()); LLViewerPartSim::getInstance()->destroyClass(); } diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b147b471faa994cbbeb9a2a1c424ad8c2a5fdfef..edb700258482eeba750ca772e68f517dc68ee6b7 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -116,7 +116,7 @@ def flags_list(self): if self.default_channel(): # beta grid viewer channel_flags = '--settings settings_beta.xml' - grid_flags = "--grid %(grid)s --helperuri http://preview-%(grid)s.secondlife.com/helpers/" % {'grid':self.args['grid']} + 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']} 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.png","secondlife_icon.png") + #self.path("res/ll_icon.ico","secondlife.ico") if self.prefix("linux_tools", ""): self.path("client-readme.txt","README-linux.txt") self.path("client-readme-voice.txt","README-linux-voice.txt")