QAR-449 Viewer 1.20 RC 0

merge Branch_1-20-Viewer -r 84060 : 84432 -> release
master
Steven Bennetts 2008-04-17 02:42:27 +00:00
parent d2597d35cf
commit d85247e63e
42 changed files with 312 additions and 254 deletions

View File

@ -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);
}
}

View File

@ -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

View File

@ -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";

View File

@ -1113,15 +1113,17 @@ LLFlyoutButton::LLFlyoutButton(
mExpanderButtonImage = LLUI::getUIImage("flyout_btn_right.tga");
mActionButtonImageSelected = LLUI::getUIImage("flyout_btn_left_selected.tga");
mExpanderButtonImageSelected = LLUI::getUIImage("flyout_btn_right_selected.tga");
mActionButtonImageDisabled = LLUI::getUIImage("flyout_btn_left_disabled.tga");
mExpanderButtonImageDisabled = LLUI::getUIImage("flyout_btn_right_disabled.tga");
mActionButton->setImageSelected(mActionButtonImageSelected);
mActionButton->setImageUnselected(mActionButtonImage);
mActionButton->setImageDisabled(LLPointer<LLUIImage>(NULL));
mActionButton->setImageDisabled(mActionButtonImageDisabled);
mActionButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
mButton->setImageSelected(mExpanderButtonImageSelected);
mButton->setImageUnselected(mExpanderButtonImage);
mButton->setImageDisabled(LLPointer<LLUIImage>(NULL));
mButton->setImageDisabled(mExpanderButtonImageDisabled);
mButton->setImageDisabledSelected(LLPointer<LLUIImage>(NULL));
mButton->setRightHPad(6);

View File

@ -225,6 +225,8 @@ protected:
LLPointer<LLUIImage> mExpanderButtonImage;
LLPointer<LLUIImage> mActionButtonImageSelected;
LLPointer<LLUIImage> mExpanderButtonImageSelected;
LLPointer<LLUIImage> mActionButtonImageDisabled;
LLPointer<LLUIImage> mExpanderButtonImageDisabled;
BOOL mToggleState;
};

View File

@ -832,8 +832,8 @@ void LLFloater::setMinimized(BOOL minimize)
for (S32 i = 0; i < 4; i++)
{
mResizeBar[i]->setEnabled(FALSE);
mResizeHandle[i]->setEnabled(FALSE);
if (mResizeBar[i]) mResizeBar[i]->setEnabled(FALSE);
if (mResizeHandle[i]) mResizeHandle[i]->setEnabled(FALSE);
}
mMinimized = TRUE;
@ -875,8 +875,8 @@ void LLFloater::setMinimized(BOOL minimize)
for (S32 i = 0; i < 4; i++)
{
mResizeBar[i]->setEnabled(isResizable());
mResizeHandle[i]->setEnabled(isResizable());
if (mResizeBar[i]) mResizeBar[i]->setEnabled(isResizable());
if (mResizeHandle[i]) mResizeHandle[i]->setEnabled(isResizable());
}
mMinimized = FALSE;

View File

@ -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>

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -3040,24 +3040,21 @@ void LLAgent::updateCamera()
}
// Update UI with our camera inputs
if (gFloaterCamera)
{
gFloaterCamera->mRotate->setToggleState(
mOrbitRightKey > 0.f, // left
mOrbitUpKey > 0.f, // top
mOrbitLeftKey > 0.f, // right
mOrbitDownKey > 0.f); // bottom
LLFloaterCamera::getInstance()->mRotate->setToggleState(
mOrbitRightKey > 0.f, // left
mOrbitUpKey > 0.f, // top
mOrbitLeftKey > 0.f, // right
mOrbitDownKey > 0.f); // bottom
gFloaterCamera->mZoom->setToggleState(
mOrbitInKey > 0.f, // top
mOrbitOutKey > 0.f); // bottom
LLFloaterCamera::getInstance()->mZoom->setToggleState(
mOrbitInKey > 0.f, // top
mOrbitOutKey > 0.f); // bottom
gFloaterCamera->mTrack->setToggleState(
mPanLeftKey > 0.f, // left
mPanUpKey > 0.f, // top
mPanRightKey > 0.f, // right
mPanDownKey > 0.f); // bottom
}
LLFloaterCamera::getInstance()->mTrack->setToggleState(
mPanLeftKey > 0.f, // left
mPanUpKey > 0.f, // top
mPanRightKey > 0.f, // right
mPanDownKey > 0.f); // bottom
// Handle camera movement based on keyboard.
const F32 ORBIT_OVER_RATE = 90.f * DEG_TO_RAD; // radians per second

View File

@ -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;
}
}

View File

@ -80,7 +80,9 @@ public:
S32 getCrashBehavior() const { return mCrashBehavior; }
void setCrashBehavior(S32 cb);
virtual void handleCrashReporting() = 0; // What to do with crash report?
static void handleViewerCrash(); // Hey! The viewer crashed. Do this.
virtual void handleSyncCrashTrace() = 0; // any low-level crash-prep that has to happen in the context of the crashing thread before the crash report is delivered.
static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon.
static void handleSyncViewerCrash(); // Hey! The viewer crashed. Do this right NOW in the context of the crashing thread.
// Thread accessors
static LLTextureCache* getTextureCache() { return sTextureCache; }

View File

@ -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::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()

View File

@ -54,6 +54,7 @@ protected:
virtual bool beingDebugged();
virtual void handleCrashReporting();
virtual void handleSyncCrashTrace();
virtual bool initLogging();
virtual bool initParseCommandLine(LLCommandLineParser& clp);

View File

@ -160,6 +160,11 @@ bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)
return true;
}
void LLAppViewerMacOSX::handleSyncCrashTrace()
{
// do nothing
}
void LLAppViewerMacOSX::handleCrashReporting()
{
// Macintosh

View File

@ -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

View File

@ -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.

View File

@ -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();

View File

@ -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;

View File

@ -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;
}
}
}

View File

@ -39,24 +39,22 @@ class LLJoystickCameraZoom;
class LLJoystickCameraTrack;
class LLFloaterCamera
: public LLFloater
: public LLFloater,
public LLFloaterSingleton<LLFloaterCamera>
{
public:
LLFloaterCamera(const std::string& name);
~LLFloaterCamera();
friend class LLUISingleton<LLFloaterCamera, VisibilityPolicy<LLFloater> >;
private:
LLFloaterCamera(const LLSD& val);
~LLFloaterCamera() {};
/*virtual*/ void onOpen();
/*virtual*/ void onClose(bool app_quitting);
static void show(void*);
static void toggle(void*);
static BOOL visible(void*);
public:
LLJoystickCameraRotate* mRotate;
LLJoystickCameraZoom* mZoom;
LLJoystickCameraTrack* mTrack;
};
extern LLFloaterCamera *gFloaterCamera;
#endif

View File

@ -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();

View File

@ -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

View File

@ -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()

View File

@ -52,23 +52,18 @@ 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()
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 ) );
}

View File

@ -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;
};

View File

@ -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();

View File

@ -2650,6 +2650,10 @@ void LLCullResult::clear()
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
{
for (U32 j = 0; j < mRenderMapSize[i]; j++)
{
mRenderMap[i][j] = 0;
}
mRenderMapSize[i] = 0;
}
}

View File

@ -45,7 +45,6 @@
#include "audioengine_fmod.h"
#endif
#include "audiosettings.h"
#include "llares.h"
#include "llcachename.h"
#include "llviewercontrol.h"
@ -1585,11 +1584,11 @@ BOOL idle_startup()
if (gSavedSettings.getBOOL("ShowCameraControls"))
{
LLFloaterCamera::show(NULL);
LLFloaterCamera::showInstance();
}
if (gSavedSettings.getBOOL("ShowMovementControls"))
{
LLFloaterMove::show(NULL);
LLFloaterMove::showInstance();
}
if (gSavedSettings.getBOOL("ShowActiveSpeakers"))

View File

@ -906,7 +906,7 @@ void LLStatusBar::onClickSearch(void* data)
// static
void LLStatusBar::onClickStatGraph(void* data)
{
LLFloaterLagMeter::show(data);
LLFloaterLagMeter::showInstance();
}
BOOL can_afford_transaction(S32 cost)

View File

@ -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;
}

View File

@ -32,7 +32,6 @@
#include "llviewerprecompiledheaders.h"
#include "audioengine.h"
#include "audiosettings.h"
#include "llagent.h"
#include "llappviewer.h"
#include "llvieweraudio.h"

View File

@ -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();

View File

@ -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")
{

View File

@ -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: ");

View File

@ -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;

View File

@ -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;

View File

@ -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();
}

View File

@ -343,6 +343,8 @@ void LLWorldMap::sendItemRequest(U32 type, U64 handle)
// public
void LLWorldMap::sendMapLayerRequest()
{
if (!gAgent.getRegion()) return;
LLSD body;
body["Flags"] = mCurrentMap;
std::string url = gAgent.getRegion()->getCapability(

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -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")