SL-15999 - track --noninteractive state with gNonInteractive flag

meow-7.2.2
Brad Payne (Vir Linden) 2021-09-20 13:19:20 +01:00
parent 0918958507
commit c10d601ce8
7 changed files with 10 additions and 11 deletions

View File

@ -62,6 +62,7 @@
BOOL gDebugSession = FALSE;
BOOL gClothRipple = FALSE;
BOOL gHeadlessClient = FALSE;
BOOL gNonInteractive = FALSE;
BOOL gGLActive = FALSE;
BOOL gGLDebugLoggingEnabled = TRUE;

View File

@ -488,6 +488,7 @@ void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor
extern BOOL gClothRipple;
extern BOOL gHeadlessClient;
extern BOOL gNonInteractive;
extern BOOL gGLActive;
// Deal with changing glext.h definitions for newer SDK versions, specifically

View File

@ -1557,8 +1557,7 @@ bool LLAppViewer::doFrame()
ms_sleep(yield_time);
}
static LLCachedControl<bool> s_non_interactive(gSavedSettings, "NonInteractive", false);
if (s_non_interactive)
if (gNonInteractive)
{
S32 non_interactive_ms_sleep_time = 1000;
LLAppViewer::getTextureCache()->pause();
@ -2979,6 +2978,7 @@ bool LLAppViewer::initWindow()
// store setting in a global for easy access and modification
gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient");
gNonInteractive = gSavedSettings.getBOOL("NonInteractive");
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");

View File

@ -1687,7 +1687,7 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type)
/*static*/
LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, F64 zoom_factor, const std::string target, bool clean_browser)
{
if (gSavedSettings.getBOOL("NonInteractive"))
if (gNonInteractive)
{
return NULL;
}

View File

@ -107,6 +107,7 @@
#include "llcleanup.h"
#include "llcallstack.h"
#include "llmeshrepository.h"
#include "llgl.h"
//#define DEBUG_UPDATE_TYPE
@ -153,8 +154,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL;
dumpStack("ObjectUpdateStack");
static LLCachedControl<bool> s_non_interactive(gSavedSettings, "NonInteractive", false);
LLViewerObject *res = NULL;
LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT);
@ -162,7 +161,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
{
case LL_PCODE_VOLUME:
{
if (!s_non_interactive)
if (!gNonInteractive)
{
res = new LLVOVolume(id, pcode, regionp); break;
}
@ -201,7 +200,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
}
else
{
if (!s_non_interactive)
if (!gNonInteractive)
{
LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp);
avatar->initInstance();

View File

@ -304,10 +304,9 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects");
LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp)
{
static LLCachedControl<bool> s_non_interactive(gSavedSettings, "NonInteractive", false);
LLDataPacker *cached_dpp = entry->getDP();
if (!cached_dpp || s_non_interactive)
if (!cached_dpp || gNonInteractive)
{
return NULL; //nothing cached.
}

View File

@ -1158,8 +1158,7 @@ void LLPipeline::refreshCachedSettings()
RenderSpotLight = nullptr;
updateRenderDeferred();
bool non_interactive = gSavedSettings.getBOOL("NonInteractive");
if (non_interactive)
if (gNonInteractive)
{
LLVOAvatar::sMaxNonImpostors = 1;
LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors);