diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 8adec3ef10..282225e71d 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -10,19 +10,20 @@ env: AUTOBUILD_VARIABLES_FILE: ${{github.workspace}}/build-variables/variables EXTRA_ARGS: -DUSE_FMODSTUDIO=ON -DUSE_KDU=ON --crashreporting build_secrets_checkout: ${{github.workspace}}/signing + XZ_DEFAULTS: -T0 jobs: build_matrix: strategy: matrix: - os: [macos-10.15,ubuntu-20.04,windows-2022] + os: [macos-11,ubuntu-20.04,windows-2022] grid: [sl,os] addrsize: [64,32] exclude: - os: ubuntu-20.04 addrsize: 32 - - os: macos-10.15 + - os: macos-11 addrsize: 32 runs-on: ${{ matrix.os }} steps: @@ -196,6 +197,12 @@ jobs: fi done shell: bash + + - name: make Nightly builds expire after 14 days + if: env.FS_BUILD_TYPE == 'Nightly' + run: | + echo "EXTRA_ARGS=${{ env.EXTRA_ARGS}} --testbuild=14" >> $GITHUB_ENV + - name: Clean up packages to give more space run: rm *${{ env.fallback_platform }}*bz2 shell: bash @@ -246,18 +253,22 @@ jobs: - name: Install discord-webhook library run: pip install discord-webhook - - name: find channel from Branch name + - name: find channel and webhook from Branch name run: | if [[ "${{ github.ref_name }}" == *Release* ]]; then FS_RELEASE_FOLDER=release - else - if [[ "${{github.event_name}}" == 'schedule' ]]; then - FS_RELEASE_FOLDER=nightly + FS_BUILD_WEBHOOK_URL=${{ secrets.RELEASE_WEBHOOK_URL }} else - FS_RELEASE_FOLDER=preview + if [[ "${{github.event_name}}" == 'schedule' ]]; then + FS_RELEASE_FOLDER=nightly + FS_BUILD_WEBHOOK_URL=${{ secrets.NIGHTLY_WEBHOOK_URL }} + else + FS_RELEASE_FOLDER=preview + FS_BUILD_WEBHOOK_URL=${{ secrets.BETA_WEBHOOK_URL }} fi fi echo "FS_RELEASE_FOLDER=${FS_RELEASE_FOLDER}" >> $GITHUB_ENV + echo "FS_BUILD_WEBHOOK_URL=${FS_BUILD_WEBHOOK_URL}" >> $GITHUB_ENV - name: Download artifacts uses: actions/download-artifact@v3 @@ -269,7 +280,7 @@ jobs: working-directory: ${{steps.download.outputs.download-path}} - name: Reorganise artifacts ready for server upload. - run: python ./fsutils/download_list.py -u ${{steps.download.outputs.download-path}} -w ${{ secrets.RELEASE_WEBHOOK_URL }} + run: python ./fsutils/download_list.py -u ${{steps.download.outputs.download-path}} -w ${{ env.FS_BUILD_WEBHOOK_URL }} - name: Setup rclone and download the folder uses: beqjanus/setup-rclone@main diff --git a/doc/contributions.txt b/doc/contributions.txt index 970cdfac5d..6d3f068936 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -239,6 +239,7 @@ Ansariel Hiller SL-15227 SL-15398 SL-18432 + SL-4126 Aralara Rajal Arare Chantilly CHUIBUG-191 @@ -289,6 +290,7 @@ Beq Janus SL-18592 SL-18637 SL-19317 + SL-19660 Beth Walcher Bezilon Kasei Biancaluce Robbiani diff --git a/fsutils/download_list.py b/fsutils/download_list.py index b8534efeff..2dc8cfd08d 100644 --- a/fsutils/download_list.py +++ b/fsutils/download_list.py @@ -80,7 +80,8 @@ def get_md5(mdfile): #split md5sum on space md5sum = md5sum.split()[0] #remove leading '\' - md5sum = md5sum[1:] + if md5sum[0] == "\\": + md5sum = md5sum[1:] print(f"generating md5sum for {mdfile} as {md5sum}") return md5sum @@ -210,7 +211,11 @@ for build_type in build_types_created: platforms_printable = {"windows":"MS Windows", "mac":"MacOS", "linux":"Linux"} grids_printable = {"SL":"Second Life", "OS":"OpenSim"} - download_root = f"https://downloads.firestormviewer.org/{build_types[build_type]}/" + download_root = f"https://downloads.firestormviewer.org/{build_types[build_type]}" + output += f''' +DOWNLOADS - {build_type} +------------------------------------------------------------------------------------------------------- +''' for dir in dirs: print(f"Getting files for {dir} in {build_type_dir}") files = get_files(os.path.join(build_type_dir, dir)) @@ -236,11 +241,8 @@ for build_type in build_types_created: print(f"No files found for {dir} in {build_type_dir}") - output += f''' -DOWNLOADS - {build_type} -''' - output += f'''------------------------------------------------------------------------------------------------------- + output += f''' {platforms_printable[dir]} ''' dir = dir.lower() @@ -266,8 +268,7 @@ DOWNLOADS - {build_type} except KeyError: output += f"{platform} for {grid_printable} ({wordsize}-bit) - NOT AVAILABLE\n" output += "\n" - output += ''' -------------------------------------------------------------------------------------------------------- + output += '''------------------------------------------------------------------------------------------------------- ''' if args.webhook: @@ -276,6 +277,7 @@ DOWNLOADS - {build_type} # Send the webhook response = webhook.execute() # Print the response - print(f"Webhook response: {response}") + if not response.ok: + print(f"Webhook Error {response.status_code}: {response.text}") print(output) diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp index a645e624f8..590915e9d2 100644 --- a/indra/llcommon/llsd.cpp +++ b/indra/llcommon/llsd.cpp @@ -622,7 +622,7 @@ namespace if (index >= mData.size()) { - mData.resize(i + 1); + mData.resize(index + 1); } return mData[index]; diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 4e9fcc77ee..cdb9a7ed8a 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -30,7 +30,6 @@ #include #include #include -#include #include "stdtypes.h" @@ -216,21 +215,15 @@ public: void assign(const Date&); void assign(const URI&); void assign(const Binary&); - - // support assignment from size_t et al. - template ::value && - ! std::is_same::value, - bool>::type = true> - void assign(VALUE v) { assign(Integer(narrow(v))); } - // support assignment from F32 et al. - template ::value, - bool>::type = true> - void assign(VALUE v) { assign(Real(narrow(v))); } - - template - LLSD& operator=(VALUE v) { assign(v); return *this; } + + LLSD& operator=(Boolean v) { assign(v); return *this; } + LLSD& operator=(Integer v) { assign(v); return *this; } + LLSD& operator=(Real v) { assign(v); return *this; } + LLSD& operator=(const String& v) { assign(v); return *this; } + LLSD& operator=(const UUID& v) { assign(v); return *this; } + LLSD& operator=(const Date& v) { assign(v); return *this; } + LLSD& operator=(const URI& v) { assign(v); return *this; } + LLSD& operator=(const Binary& v) { assign(v); return *this; } //@} /** @@ -292,6 +285,7 @@ public: //@{ LLSD(const char*); void assign(const char*); + LLSD& operator=(const char* v) { assign(v); return *this; } //@} /** @name Map Values */ diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 74ec62d347..58bedacf43 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -121,9 +121,14 @@ U32 micro_sleep(U64 us, U32 max_yields) U64 start = get_clock_count(); // This is kernel dependent. Currently, our kernel generates software clock // interrupts at 250 Hz (every 4,000 microseconds). - const U64 KERNEL_SLEEP_INTERVAL_US = 4000; + const S64 KERNEL_SLEEP_INTERVAL_US = 4000; - auto num_sleep_intervals = (us - (KERNEL_SLEEP_INTERVAL_US >> 1)) / KERNEL_SLEEP_INTERVAL_US; + // Use signed arithmetic to discover whether a sleep is even necessary. If + // either 'us' or KERNEL_SLEEP_INTERVAL_US is unsigned, the compiler + // promotes the difference to unsigned. If 'us' is less than half + // KERNEL_SLEEP_INTERVAL_US, the unsigned difference will be hugely + // positive, resulting in a crazy long wait. + auto num_sleep_intervals = (S64(us) - (KERNEL_SLEEP_INTERVAL_US >> 1)) / KERNEL_SLEEP_INTERVAL_US; if (num_sleep_intervals > 0) { U64 sleep_time = (num_sleep_intervals * KERNEL_SLEEP_INTERVAL_US) - (KERNEL_SLEEP_INTERVAL_US >> 1); diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h index da8512169c..18615ba95f 100644 --- a/indra/llcommon/stdtypes.h +++ b/indra/llcommon/stdtypes.h @@ -41,7 +41,7 @@ typedef unsigned int U32; // to express an index that might go negative // (ssize_t is provided by SOME compilers, don't collide) -typedef typename std::make_signed::type llssize; +typedef typename std::make_signed::type llssize; // Stop Linux complaining #if LL_WINDOWS // https://docs.microsoft.com/en-us/cpp/build/reference/zc-wchar-t-wchar-t-is-native-type diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index eb709585b8..d732032a6c 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -286,7 +286,7 @@ F32 LLSettingsWater::getModifiedWaterFogDensity(bool underwater) const if (underwater && underwater_fog_mod > 0.0f) { underwater_fog_mod = llclamp(underwater_fog_mod, 0.0f, 10.0f); - // BUG-233797/BUG-233798 -ve underwater fog density can cause (unrecoverable) blackout. + // BUG-233797/BUG-233798 -ve underwater fog density can cause (unrecoverable) blackout. // raising a negative number to a non-integral power results in a non-real result (which is NaN for our purposes) // Two methods were tested, number 2 is being used: // 1) Force the fog_mod to be integral. The effect is unlikely to be nice, but it is better than blackness. @@ -299,7 +299,6 @@ F32 LLSettingsWater::getModifiedWaterFogDensity(bool underwater) const { fog_density = 1.0f; } - // fog_density = pow(fog_density, underwater_fog_mod); } return fog_density; diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index df9224139d..2591642f7a 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -268,7 +268,9 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h { const LLUUID& agent_id = *it; - LL_WARNS("AvNameCache") << "LLAvatarNameResponder::result " + // If cap fails, response can contain a lot of names, + // don't spam too much + LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result " << "failed id " << agent_id << LL_ENDL; @@ -296,7 +298,7 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) // // there is no existing cache entry, so make a temporary name from legacy - LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent " + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache get legacy for agent " << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility boost::bind(&LLAvatarNameCache::legacyNameFetch, _1, _2, _3)); diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index a7086e09de..b6bd67dc8e 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1768,7 +1768,8 @@ void LLFolderView::update() // Clear the modified setting on the filter only if the filter finished after running the filter process // Note: if the filter count has timed out, that means the filter halted before completing the entire set of items - if (filter_object.isModified() && (!filter_object.isTimedOut())) + bool filter_modified = filter_object.isModified(); + if (filter_modified && (!filter_object.isTimedOut())) { filter_object.clearModified(); } @@ -1802,7 +1803,7 @@ void LLFolderView::update() BOOL filter_finished = mViewModel->contentsReady() && (getViewModelItem()->passedFilter() || ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration() - && !filter_object.isModified())); + && !filter_modified)); if (filter_finished || gFocusMgr.childHasKeyboardFocus(mParentPanel.get()) || gFocusMgr.childHasMouseCapture(mParentPanel.get())) @@ -1890,13 +1891,26 @@ void LLFolderView::update() if (mSelectedItems.size() && mNeedsScroll) { - scrollToShowItem(mSelectedItems.back(), constraint_rect); + LLFolderViewItem* scroll_to_item = mSelectedItems.back(); + scrollToShowItem(scroll_to_item, constraint_rect); // continue scrolling until animated layout change is done - if (filter_finished - && (!needsArrange() || !is_visible)) - { - mNeedsScroll = FALSE; - } + bool selected_filter_finished = getRoot()->getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration(); + if (selected_filter_finished && scroll_to_item && scroll_to_item->getViewModelItem()) + { + selected_filter_finished = scroll_to_item->getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration(); + } + if (filter_finished && selected_filter_finished) + { + bool needs_arrange = needsArrange() || getRoot()->needsArrange(); + if (mParentFolder) + { + needs_arrange |= (bool)mParentFolder->needsArrange(); + } + if (!needs_arrange || !is_visible) + { + mNeedsScroll = FALSE; + } + } } if (mSignalSelectCallback) diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 2d36616e25..d2d7e3c36c 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -350,7 +350,6 @@ protected: F32 mAutoOpenCountdown; S32 mLastArrangeGeneration; S32 mLastCalculatedWidth; - // bool mNeedsSort; Unused. bool mIsFolderComplete; // indicates that some children were not loaded/added yet bool mAreChildrenInited; // indicates that no children were initialized diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index fe081f87b5..18101d7b82 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -338,7 +338,7 @@ void LLNotificationForm::addElement(const std::string& type, const std::string& element["name"] = name; element["text"] = name; element["value"] = value; - element["index"] = mFormData.size(); + element["index"] = LLSD::Integer(mFormData.size()); element["enabled"] = enabled; mFormData.append(element); } diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp index 04b99187eb..179e69a7ce 100644 --- a/indra/llwindow/llkeyboardwin32.cpp +++ b/indra/llwindow/llkeyboardwin32.cpp @@ -252,31 +252,9 @@ void LLKeyboardWin32::scanKeyboard() { S32 key; MSG msg; - BOOL pending_key_events = PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD); + PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD); for (key = 0; key < KEY_COUNT; key++) { - // On Windows, verify key down state. JC - // RN: only do this if we don't have further key events in the queue - // as otherwise there might be key repeat events still waiting for this key we are now dumping - if (!pending_key_events && mKeyLevel[key]) - { - // *TODO: I KNOW there must be a better way of - // interrogating the key state than this, using async key - // state can cause ALL kinds of bugs - Doug - if ((key < KEY_BUTTON0) && ((key < '0') || (key > '9'))) - { - // ...under windows make sure the key actually still is down. - // ...translate back to windows key - U16 virtual_key = inverseTranslateExtendedKey(key); - // keydown in highest bit - if (!pending_key_events && !(GetAsyncKeyState(virtual_key) & 0x8000)) - { - //LL_INFOS() << "Key up event missed, resetting" << LL_ENDL; - mKeyLevel[key] = FALSE; - } - } - } - // Generate callback if any event has occurred on this key this frame. // Can't just test mKeyLevel, because this could be a slow frame and // key might have gone down then up. JC diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 5ea36a044a..97154f804c 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.12 +6.6.13 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3af70e116d..b2df92f05c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11198,6 +11198,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + NvAPICreateApplicationProfile + + Comment + Create NVIDIA application profile for optimized settings + Persist + 1 + Type + Boolean + Value + 1 + PurgeCacheOnNextStartup Comment @@ -25304,6 +25315,7 @@ Change of this parameter will affect the layout of buttons in notification toast LLSD Value + az de en es diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index 959294cb6f..20c5d75bdf 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -154,7 +154,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const params.append(event_data["x"]); params.append(event_data["y"]); params.append(event_data["z"]); - LLCommandDispatcher::dispatch("teleport", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, "clicked", true); + LLCommandDispatcher::dispatch("teleport", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true); // *TODO - lookup other LLCommandHandlers for "agent", "classified", "event", "group", "floater", "parcel", "login", login_refresh", "balance", "chat" // should we just compose LLCommandHandler and LLDispatchListener? } @@ -164,7 +164,7 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const LLVector3(event_data["x"].asReal(), event_data["y"].asReal(), event_data["z"].asReal())).getSLURLString(); - LLURLDispatcher::dispatch(url, "clicked", NULL, false); + LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, NULL, false); } } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 14d2e39b3c..9939b9df8c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2540,6 +2540,7 @@ bool LLAppViewer::cleanup() LLSelectMgr::deleteSingleton(); LLViewerEventRecorder::deleteSingleton(); LLWorld::deleteSingleton(); + LLVoiceClient::deleteSingleton(); // It's not at first obvious where, in this long sequence, a generic cleanup // call OUGHT to go. So let's say this: as we migrate cleanup from diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 783e06a580..f3b43244c4 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -302,25 +302,8 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) std::string app_name = LLTrans::getString("APP_NAME"); llutf16string w_app_name = utf8str_to_utf16str(app_name); wsprintf(profile_name, L"%s", w_app_name.c_str()); - // FIRE-16667 / BUG-9906: Viewer messing up the global NVIDIA driver profile - //status = NvAPI_DRS_SetCurrentGlobalProfile(hSession, profile_name); - //if (status != NVAPI_OK) - //{ - // nvapi_error(status); - // return; - //} - - //// (3) Obtain the current profile. - //NvDRSProfileHandle hProfile = 0; - //status = NvAPI_DRS_GetCurrentGlobalProfile(hSession, &hProfile); - //if (status != NVAPI_OK) - //{ - // nvapi_error(status); - // return; - //} - NvDRSProfileHandle hProfile = 0; - // Check if we already have a Firestorm profile + // (3) Check if we already have an application profile for the viewer status = NvAPI_DRS_FindProfileByName(hSession, profile_name, &hProfile); if (status != NVAPI_OK && status != NVAPI_PROFILE_NOT_FOUND) { @@ -329,8 +312,8 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) } else if (status == NVAPI_PROFILE_NOT_FOUND) { - // Don't have a Firestorm profile yet - create one - LL_INFOS() << "Creating Firestorm profile for NVIDIA driver" << LL_ENDL; + // Don't have an application profile yet - create one + LL_INFOS() << "Creating NVIDIA application profile" << LL_ENDL; NVDRS_PROFILE profileInfo; profileInfo.version = NVDRS_PROFILE_VER; @@ -345,7 +328,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) } } - // Check if current exe is part of the profile + // (4) Check if current exe is part of the profile std::string exe_name = gDirUtilp->getExecutableFilename(); NVDRS_APPLICATION profile_application; profile_application.version = NVDRS_APPLICATION_VER; @@ -362,7 +345,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) } else if (status == NVAPI_EXECUTABLE_NOT_FOUND) { - LL_INFOS() << "Creating application for " << exe_name << " for NVIDIA driver" << LL_ENDL; + LL_INFOS() << "Creating application for " << exe_name << " for NVIDIA application profile" << LL_ENDL; // Add this exe to the profile NVDRS_APPLICATION application; @@ -382,13 +365,12 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) // Save application in case we added one status = NvAPI_DRS_SaveSettings(hSession); - if (status != NVAPI_OK) + if (status != NVAPI_OK) { nvapi_error(status); return; } } - // // load settings for querying status = NvAPI_DRS_LoadSettings(hSession); @@ -404,7 +386,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) status = NvAPI_DRS_GetSetting(hSession, hProfile, PREFERRED_PSTATE_ID, &drsSetting); if (status == NVAPI_SETTING_NOT_FOUND) { //only override if the user hasn't specifically set this setting - // (4) Specify that we want the VSYNC disabled setting + // (5) Specify that we want to enable maximum performance setting // first we fill the NVDRS_SETTING struct, then we call the function drsSetting.version = NVDRS_SETTING_VER; drsSetting.settingId = PREFERRED_PSTATE_ID; @@ -417,7 +399,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) return; } - // (5) Now we apply (or save) our changes to the system + // (6) Now we apply (or save) our changes to the system status = NvAPI_DRS_SaveSettings(hSession); if (status != NVAPI_OK) { @@ -502,27 +484,31 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LL_WARNS() << "Application init failed." << LL_ENDL; return -1; } - - NvAPI_Status status; - - // Initialize NVAPI - status = NvAPI_Initialize(); - NvDRSSessionHandle hSession = 0; - if (status == NVAPI_OK) - { - // Create the session handle to access driver settings - status = NvAPI_DRS_CreateSession(&hSession); - if (status != NVAPI_OK) - { - nvapi_error(status); - } - else - { - //override driver setting as needed - ll_nvapi_init(hSession); - } - } + NvDRSSessionHandle hSession = 0; + static LLCachedControl use_nv_api(gSavedSettings, "NvAPICreateApplicationProfile", true); + if (use_nv_api) + { + NvAPI_Status status; + + // Initialize NVAPI + status = NvAPI_Initialize(); + + if (status == NVAPI_OK) + { + // Create the session handle to access driver settings + status = NvAPI_DRS_CreateSession(&hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + } + else + { + //override driver setting as needed + ll_nvapi_init(hSession); + } + } + } // Have to wait until after logging is initialized to display LFH info if (num_heaps > 0) @@ -782,101 +768,107 @@ bool LLAppViewerWin32::init() // LLFile::remove(log_file, ENOENT); //} - success = LLAppViewer::init(); - if (!success) - return false; + // Win7 is no longer supported + bool is_win_7_or_below = LLOSInfo::getInstance()->mMajorVer <= 6 && LLOSInfo::getInstance()->mMajorVer <= 1; - checkTemp(); // Always do and log this, no matter if using Bugsplat or not + if (!is_win_7_or_below) + { + success = LLAppViewer::init(); + if (!success) + return false; - // Save those early so we don't have to deal with the dynamic memory during in process crash handling. - FS::LogfileIn = ll_convert_string_to_wide(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "Firestorm.log")); - FS::LogfileOut = ll_convert_string_to_wide(gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "Firestorm.log")); - FS::DumpFile = ll_convert_string_to_wide(gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "Firestorm.dmp")); + checkTemp(); // Always do and log this, no matter if using Bugsplat or not - S32 nCrashSubmitBehavior = gCrashSettings.getS32("CrashSubmitBehavior"); - // Don't ever send? bail out! - if (nCrashSubmitBehavior == 2 /*CRASH_BEHAVIOR_NEVER_SEND*/) - return success; + // Save those early so we don't have to deal with the dynamic memory during in process crash handling. + FS::LogfileIn = ll_convert_string_to_wide(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "Firestorm.log")); + FS::LogfileOut = ll_convert_string_to_wide(gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "Firestorm.log")); + FS::DumpFile = ll_convert_string_to_wide(gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "Firestorm.dmp")); - DWORD dwAsk{ MDSF_NONINTERACTIVE }; - if (nCrashSubmitBehavior == 0 /*CRASH_BEHAVIOR_ASK*/) - dwAsk = 0; - // - - std::string build_data_fname( - gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json")); - // Use llifstream instead of std::ifstream because LL_PATH_EXECUTABLE - // could contain non-ASCII characters, which std::ifstream doesn't handle. - llifstream inf(build_data_fname.c_str()); - if (! inf.is_open()) - { - LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't read '" << build_data_fname - << "'" << LL_ENDL; - } - else - { - Json::Reader reader; - Json::Value build_data; - if (! reader.parse(inf, build_data, false)) // don't collect comments - { - // gah, the typo is baked into Json::Reader API - LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname - << "': " << reader.getFormatedErrorMessages() << LL_ENDL; - } - else - { - Json::Value BugSplat_DB = build_data["BugSplat DB"]; - if (! BugSplat_DB) - { - LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '" - << build_data_fname << "'" << LL_ENDL; - } - else - { - // Got BugSplat_DB, onward! - std::wstring version_string(WSTRINGIZE(LL_VIEWER_VERSION_MAJOR << '.' << - LL_VIEWER_VERSION_MINOR << '.' << - LL_VIEWER_VERSION_PATCH << '.' << - LL_VIEWER_VERSION_BUILD)); + S32 nCrashSubmitBehavior = gCrashSettings.getS32("CrashSubmitBehavior"); + // Don't ever send? bail out! + if (nCrashSubmitBehavior == 2 /*CRASH_BEHAVIOR_NEVER_SEND*/) + return success; - // Set up Bugsplat to ask or always send - //DWORD dwFlags = MDSF_NONINTERACTIVE | // automatically submit report without prompting - // MDSF_PREVENTHIJACKING; // disallow swiping Exception filter - DWORD dwFlags = dwAsk | - MDSF_PREVENTHIJACKING; // disallow swiping Exception filter - // + DWORD dwAsk{ MDSF_NONINTERACTIVE }; + if (nCrashSubmitBehavior == 0 /*CRASH_BEHAVIOR_ASK*/) + dwAsk = 0; + // + + std::string build_data_fname( + gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json")); + // Use llifstream instead of std::ifstream because LL_PATH_EXECUTABLE + // could contain non-ASCII characters, which std::ifstream doesn't handle. + llifstream inf(build_data_fname.c_str()); + if (! inf.is_open()) + { + LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't read '" << build_data_fname + << "'" << LL_ENDL; + } + else + { + Json::Reader reader; + Json::Value build_data; + if (! reader.parse(inf, build_data, false)) // don't collect comments + { + // gah, the typo is baked into Json::Reader API + LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname + << "': " << reader.getFormatedErrorMessages() << LL_ENDL; + } + else + { + Json::Value BugSplat_DB = build_data["BugSplat DB"]; + if (! BugSplat_DB) + { + LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '" + << build_data_fname << "'" << LL_ENDL; + } + else + { + // Got BugSplat_DB, onward! + std::wstring version_string(WSTRINGIZE(LL_VIEWER_VERSION_MAJOR << '.' << + LL_VIEWER_VERSION_MINOR << '.' << + LL_VIEWER_VERSION_PATCH << '.' << + LL_VIEWER_VERSION_BUILD)); - //bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT"); - //if (needs_log_file) - //{ - // // Startup only! - // LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL; - // dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE; - //} + // Set up Bugsplat to ask or always send + //DWORD dwFlags = MDSF_NONINTERACTIVE | // automatically submit report without prompting + // MDSF_PREVENTHIJACKING; // disallow swiping Exception filter + DWORD dwFlags = dwAsk | + MDSF_PREVENTHIJACKING; // disallow swiping Exception filter + // - // have to convert normal wide strings to strings of __wchar_t - sBugSplatSender = new MiniDmpSender( - WCSTR(BugSplat_DB.asString()), - WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)), - WCSTR(version_string), - nullptr, // szAppIdentifier -- set later - dwFlags); + //bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT"); + //if (needs_log_file) + //{ + // // Startup only! + // LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL; + // dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE; + //} - sBugSplatSender->setCallback(bugsplatSendLog); + // have to convert normal wide strings to strings of __wchar_t + sBugSplatSender = new MiniDmpSender( + WCSTR(BugSplat_DB.asString()), + WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)), + WCSTR(version_string), + nullptr, // szAppIdentifier -- set later + dwFlags); - //if (needs_log_file) - //{ - // // Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash - // std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log"); - // sBugSplatSender->setLogFilePath(WCSTR(log_file)); - //} + sBugSplatSender->setCallback(bugsplatSendLog); - // engage stringize() overload that converts from wstring - LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL) - << ' ' << stringize(version_string) << ')' << LL_ENDL; - } // got BugSplat_DB - } // parsed build_data.json - } // opened build_data.json + //if (needs_log_file) + //{ + // // Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash + // std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log"); + // sBugSplatSender->setLogFilePath(WCSTR(log_file)); + //} + + // engage stringize() overload that converts from wstring + LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL) + << ' ' << stringize(version_string) << ')' << LL_ENDL; + } // got BugSplat_DB + } // parsed build_data.json + } // opened build_data.json + } // !is_win_7_or_below #endif // LL_BUGSPLAT #endif // LL_SEND_CRASH_REPORTS diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp index 1b85c09071..46ec97d5c0 100644 --- a/indra/newview/llcommanddispatcherlistener.cpp +++ b/indra/newview/llcommanddispatcherlistener.cpp @@ -64,8 +64,13 @@ void LLCommandDispatcherListener::dispatch(const LLSD& params) const // But for testing, allow a caller to specify untrusted. trusted_browser = params["trusted"].asBoolean(); } - LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], "", NULL, - "clicked", trusted_browser); + LLCommandDispatcher::dispatch(params["cmd"], + params["params"], + params["query"], + "", + NULL, + LLCommandHandler::NAV_TYPE_CLICKED, + trusted_browser); } void LLCommandDispatcherListener::enumerate(const LLSD& params) const diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index e774a9390a..caa27e530b 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -40,6 +40,8 @@ static LLCommandDispatcherListener sCommandDispatcherListener; const std::string LLCommandHandler::NAV_TYPE_CLICKED = "clicked"; +const std::string LLCommandHandler::NAV_TYPE_EXTERNAL = "external"; +const std::string LLCommandHandler::NAV_TYPE_NAVIGATED = "navigated"; //--------------------------------------------------------------------------- // Underlying registry for command handlers, not directly accessible. diff --git a/indra/newview/llcommandhandler.h b/indra/newview/llcommandhandler.h index c7a7a18c7d..1a354b04f7 100644 --- a/indra/newview/llcommandhandler.h +++ b/indra/newview/llcommandhandler.h @@ -70,6 +70,8 @@ public: }; static const std::string NAV_TYPE_CLICKED; + static const std::string NAV_TYPE_EXTERNAL; + static const std::string NAV_TYPE_NAVIGATED; LLCommandHandler(const char* command, EUntrustedAccess untrusted_access); // Automatically registers object to get called when diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index d5f15c9f6c..bc1058cb9e 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -283,8 +283,9 @@ namespace Details errorCount = 0; if (!result.isMap() || - !result.get("events") || - !result.get("id")) + !result.has("events") || + !result["events"].isArray() || + !result.has("id")) { LL_WARNS("LLEventPollImpl") << " <" << counter << "> received event poll with no events or id key: " << result << LL_ENDL; continue; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ba6fbf35ac..3294e573a9 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -509,6 +509,18 @@ bool LLFeatureManager::loadGPUClass() { mGPUClass = GPU_CLASS_5; } + + #if LL_WINDOWS + const F32Gigabytes MIN_PHYSICAL_MEMORY(2); + + LLMemory::updateMemoryInfo(); + F32Gigabytes physical_mem = LLMemory::getMaxMemKB(); + if (MIN_PHYSICAL_MEMORY > physical_mem && mGPUClass > GPU_CLASS_1) + { + // reduce quality on systems that don't have enough memory + mGPUClass = (EGPUClass)(mGPUClass - 1); + } + #endif //LL_WINDOWS } //end if benchmark else { diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 3589365dc3..bdb03f287b 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -849,12 +849,14 @@ void set_nav_save_data(LLFilePicker::ESaveFilter filter, std::string &extension, break; #endif - case LLFilePicker::FFSAVE_XML: - type = "\?\?\?\?"; - creator = "\?\?\?\?"; - extension = "xml"; - break; - + // Compile fix + //case LLFilePicker::FFSAVE_XML: + // type = "\?\?\?\?"; + // creator = "\?\?\?\?"; + // extension = "xml"; + // break; + // Compile fix + case LLFilePicker::FFSAVE_RAW: type = "\?\?\?\?"; creator = "\?\?\?\?"; @@ -872,6 +874,31 @@ void set_nav_save_data(LLFilePicker::ESaveFilter filter, std::string &extension, creator = "\?\?\?\?"; extension = "lsl"; break; + + // Export filter + case FFSAVE_EXPORT: + type = "OXP "; + creator = "\?\?\?\?"; + extension = "oxp"; + break; + case FFSAVE_COLLADA: + type = "DAE "; + creator = "\?\?\?\?"; + extension = "dae"; + break; + // CSV Filter + case FFSAVE_CSV: + type = "CSV "; + creator = "\?\?\?\?"; + extension = "csv"; + break; + // + case FFSAVE_BEAM: + case FFSAVE_XML: + type = "XML "; + creator = "\?\?\?\?"; + extension = "xml"; + break; case LLFilePicker::FFSAVE_ALL: default: diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm index db2a2b7e28..4dd8bea4e1 100644 --- a/indra/newview/llfilepicker_mac.mm +++ b/indra/newview/llfilepicker_mac.mm @@ -71,7 +71,7 @@ NSOpenPanel *init_panel(const std::vector* allowed_types, unsigned return panel; } -std::unique_ptr> doLoadDialog(const std::vector* allowed_types, +std::unique_ptr> doLoadDialog(const std::vector* allowed_types, unsigned int flags) { std::unique_ptr> outfiles; diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 19bc865d8b..ad2533debc 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -165,10 +165,21 @@ void LLFloaterDisplayName::onReset() { return; } - getChild("display_name_editor")->setValue(av_name.getCompleteName()); + getChild("display_name_editor")->setValue(av_name.getUserName()); - getChild("display_name_confirm")->clear(); - getChild("display_name_confirm")->setFocus(TRUE); + if (getChild("display_name_editor")->getEnabled()) + { + // UI is enabled, fill the first field + getChild("display_name_confirm")->clear(); + getChild("display_name_confirm")->setFocus(TRUE); + } + else + { + // UI is disabled, looks like we should allow resetting + // even if user already set a display name, enable save button + getChild("display_name_confirm")->setValue(av_name.getUserName()); + getChild("save_btn")->setEnabled(true); + } } @@ -183,6 +194,21 @@ void LLFloaterDisplayName::onSave() return; } + LLAvatarName av_name; + if (!LLAvatarNameCache::get(gAgent.getID(), &av_name)) + { + return; + } + + std::string user_name = av_name.getUserName(); + if (display_name_utf8.compare(user_name) == 0 + && LLAvatarNameCache::getInstance()->hasNameLookupURL()) + { + // A reset + LLViewerDisplayName::set("", boost::bind(&LLFloaterDisplayName::onCacheSetName, this, _1, _2, _3)); + return; + } + const U32 DISPLAY_NAME_MAX_LENGTH = 31; // characters, not bytes LLWString display_name_wstr = utf8string_to_wstring(display_name_utf8); if (display_name_wstr.size() > DISPLAY_NAME_MAX_LENGTH) diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index 8633fe4e5e..a3222d622f 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -39,6 +39,7 @@ #include "llfloaterworldmap.h" #include "llproductinforequest.h" #include "llscrolllistctrl.h" +#include "llsdutil.h" #include "llstatusbar.h" #include "lltextbox.h" #include "llscrolllistctrl.h" @@ -79,24 +80,25 @@ BOOL LLFloaterLandHoldings::postBuild() for(S32 i = 0; i < count; ++i) { LLUUID id(gAgent.mGroups.at(i).mID); - - LLSD element; - element["id"] = id; - element["columns"][0]["column"] = "group"; - element["columns"][0]["value"] = gAgent.mGroups.at(i).mName; - element["columns"][0]["font"] = "SANSSERIF"; - LLUIString areastr = getString("area_string"); areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.at(i).mContribution)); - element["columns"][1]["column"] = "area"; - element["columns"][1]["value"] = areastr; - element["columns"][1]["font"] = "SANSSERIF"; - grant_list->addElement(element); + grant_list->addElement( + llsd::map( + "id", id, + "columns", llsd::array( + llsd::map( + "column", "group", + "value", gAgent.mGroups.at(i).mName, + "font", "SANSSERIF"), + llsd::map( + "column", "area", + "value", areastr, + "font", "SANSSERIF")))); } - + center(); - + return TRUE; } @@ -108,8 +110,8 @@ LLFloaterLandHoldings::~LLFloaterLandHoldings() void LLFloaterLandHoldings::onOpen(const LLSD& key) { - LLScrollListCtrl *list = getChild("parcel list"); - list->clearRows(); + LLScrollListCtrl *list = getChild("parcel list"); + list->clearRows(); // query_id null is known to be us const LLUUID& query_id = LLUUID::null; diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index b6d856e31b..241aa96bc8 100644 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -182,11 +182,15 @@ void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_gen bool generation_skip = mMarkedDirtyGeneration >= 0 && mPrevPassedAllFilters && mMarkedDirtyGeneration < mRootViewModel.getFilter().getFirstSuccessGeneration(); + S32 last_generation = mLastFilterGeneration; LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size); bool before = mPrevPassedAllFilters; mPrevPassedAllFilters = passedFilter(filter_generation); - if (before != mPrevPassedAllFilters || generation_skip) + if (before != mPrevPassedAllFilters // Change of state + || generation_skip // Was marked dirty + // Potential change from being in-progress and invisible to visible) + || (mPrevPassedAllFilters && last_generation < mRootViewModel.getFilter().getFirstRequiredGeneration())) { // Need to rearrange the folder if the filtered state of the item changed, // previously passed item skipped filter generation changes while being dirty diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 38719790a7..94571ab731 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -68,7 +68,7 @@ class LLGroupHandler : public LLCommandHandler { public: // requires trusted browser to trigger - LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_CLICK_ONLY) { } + LLGroupHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { } virtual bool canHandleUntrusted( const LLSD& params, diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 107bd77601..770bb43f3e 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -368,7 +368,10 @@ public: { // will be deleted by ~LLInventoryModel //delete mInvObserver; - LLVoiceClient::getInstance()->removeObserver(this); + if (LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->removeObserver(this); + } LLAvatarTracker::instance().removeObserver(this); } diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 0f1e72bd10..96cbcd0a32 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -3142,6 +3142,14 @@ void LLPanelProfileNotes::onOpen(const LLSD& key) void LLPanelProfileNotes::setNotesText(const std::string &text) { + // FIRE-32926 - Profile notes that are actively being edited get discarded when + // the profile owner enters or leaves the region at the same time. + if (mHasUnsavedChanges) + { + return; + } + // + mSaveChanges->setEnabled(FALSE); mDiscardChanges->setEnabled(FALSE); mHasUnsavedChanges = false; diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 1d75ecd4eb..89ec482d5c 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -176,11 +176,18 @@ LLSLURL::LLSLURL(const std::string& slurl) } else { - // it wasn't a /secondlife/ or /app/, so it must be secondlife:// + if(slurl_uri.hostName() == LLSLURL::SLURL_APP_PATH) + { + mType = APP; + } + else + { + // it wasn't a /secondlife/ or /app/, so it must be secondlife:// // therefore the hostname will be the region name, and it's a location type mType = LOCATION; // 'normalize' it so the region name is in fact the head of the path_array path_array.insert(0, slurl_uri.hostName()); + } } } else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) || diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a1d99862a2..d444ea0ab7 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -572,6 +572,8 @@ void set_flags_and_update_appearance() { LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); LLAppearanceMgr::instance().updateAppearanceFromCOF(true, true, no_op); + + LLInventoryModelBackgroundFetch::instance().start(); } // Returns false to skip other idle processing. Should only return @@ -3969,7 +3971,7 @@ bool LLStartUp::dispatchURL() || (dx*dx > SLOP*SLOP) || (dy*dy > SLOP*SLOP) ) { - LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), "clicked", + LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, false); } return true; diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 956808586e..e50b696c40 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -171,6 +171,16 @@ void LLSurface::create(const S32 grids_per_edge, mMetersPerEdge = mMetersPerGrid * (mGridsPerEdge - 1); // Aurora Sim sTextureSize = width; + + // Trap non-power of 2 widths to avoid GLtexture issues. + if ((sTextureSize & (sTextureSize - 1)) != 0) + { + // Not a power of 2, find the next power of 2 + sTextureSize = 1 << static_cast( ceil(log2(sTextureSize)) ) ; + } + + // Clamp to maximum limit + sTextureSize = std::min(sTextureSize, 1024); // Aurora Sim mOriginGlobal.setVec(origin_global); diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index a1c793f85a..61dc405d2d 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -230,7 +230,11 @@ void LLToast::hide() /*virtual*/ void LLToast::setFocus(BOOL b) { - if (b && !hasFocus() && mPanel) + if (b + && !hasFocus() + && mPanel + && mWrapperPanel + && !mWrapperPanel->getChildList()->empty()) { LLModalDialog::setFocus(TRUE); // mostly for buttons @@ -438,15 +442,18 @@ void LLToast::setVisible(BOOL show) //hide "hide" button in case toast was hidden without mouse_leave if(mHideBtn) mHideBtn->setVisible(show); - } - LLFloater::setVisible(show); - if(mPanel) - { - if(!mPanel->isDead()) - { - mPanel->setVisible(show); - } - } + } + LLFloater::setVisible(show); + if (mPanel + && !mPanel->isDead() + && mWrapperPanel + && !mWrapperPanel->getChildList()->empty() + // LLInspectToast can take over, but LLToast still appears to act like a data storage + && mPanel->getParent() == mWrapperPanel + ) + { + mPanel->setVisible(show); + } } void LLToast::updateHoveredState() diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index bdb7076202..0a78718bae 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -150,7 +150,7 @@ bool LLURLDispatcherImpl::dispatchRightClick(const LLSLURL& slurl) const bool right_click = true; LLMediaCtrl* web = NULL; const bool trusted_browser = false; - return dispatchCore(slurl, "clicked", right_click, web, trusted_browser); + return dispatchCore(slurl, LLCommandHandler::NAV_TYPE_CLICKED, right_click, web, trusted_browser); } // static @@ -541,7 +541,7 @@ bool LLURLDispatcher::dispatchFromTextEditor(const std::string& slurl, bool trus // *TODO: Make this trust model more refined. JC LLMediaCtrl* web = NULL; - return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), "clicked", web, trusted_content); + return LLURLDispatcherImpl::dispatch(LLSLURL(slurl), LLCommandHandler::NAV_TYPE_CLICKED, web, trusted_content); } diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index d67076d235..c97c8c714b 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -44,7 +44,7 @@ class LLHelpHandler : public LLCommandHandler { public: // requests will be throttled from a non-trusted browser - LLHelpHandler() : LLCommandHandler("help", UNTRUSTED_THROTTLE) {} + LLHelpHandler() : LLCommandHandler("help", UNTRUSTED_CLICK_ONLY) {} bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ff23498920..427d7e8566 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3545,6 +3545,13 @@ void handle_object_open() // LLFloaterReg::showInstance("openobject"); } +bool enable_object_inspect() +{ + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + LLViewerObject* selected_objectp = selection->getFirstRootObject(); + return selected_objectp != NULL; +} + bool enable_object_open() { // Look for contents in root object, which is all the LLFloaterOpenObject @@ -10075,7 +10082,7 @@ bool enable_object_take_copy() bool all_valid = false; if (LLSelectMgr::getInstance()) { - if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) + if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0) { all_valid = true; #ifndef HACKED_GODLIKE_VIEWER @@ -12503,6 +12510,7 @@ void initialize_menus() commit.add("Object.Open", boost::bind(&handle_object_open)); commit.add("Object.Take", boost::bind(&handle_take)); commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector)); + enable.add("Object.EnableInspect", boost::bind(&enable_object_inspect)); enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 53cb066d8a..1ccbe88778 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7410,12 +7410,8 @@ void process_script_question(LLMessageSystem *msg, void **user_data) { count++; known_questions |= script_perm.permbit; - - if (!LLMuteList::isLinden(owner_name)) - { - // check whether permission question should cause special caution dialog - caution |= (script_perm.caution); - } + // check whether permission question should cause special caution dialog + caution |= (script_perm.caution); if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit) continue; @@ -8001,7 +7997,7 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) // More than OFFER_RECIPIENT_LIMIT targets will overload the message // producing an llerror. LLSD args; - args["OFFERS"] = notification["payload"]["ids"].size(); + args["OFFERS"] = LLSD::Integer(notification["payload"]["ids"].size()); args["LIMIT"] = static_cast(OFFER_RECIPIENT_LIMIT); LLNotificationsUtil::add("TooManyTeleportOffers", args); return false; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 5f145bcccb..b210a2cf20 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -171,7 +171,7 @@ public: } // Process the SLapp as if it was a secondlife://{PLACE} SLurl - LLURLDispatcher::dispatch(url, "clicked", web, true); + LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, web, true); return true; } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 5c24a07201..f33eaa3b22 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -35,6 +35,7 @@ #include "llrender.h" #include "llenvironment.h" +#include "llerrorcontrol.h" #include "llatmosphere.h" #include "llworld.h" #include "llsky.h" @@ -566,10 +567,15 @@ void LLViewerShaderMgr::setShaders() std::string shader_name = loadBasicShaders(); if (shader_name.empty()) { - LL_INFOS() << "Loaded basic shaders." << LL_ENDL; + LL_INFOS("Shader") << "Loaded basic shaders." << LL_ENDL; } else { + // "ShaderLoading" and "Shader" need to be logged + LLError::ELevel lvl = LLError::getDefaultLevel(); + LLError::setDefaultLevel(LLError::LEVEL_DEBUG); + loadBasicShaders(); + LLError::setDefaultLevel(lvl); LL_ERRS() << "Unable to load basic shader " << shader_name << ", verify graphics driver installed and current." << LL_ENDL; reentrance = false; // For hygiene only, re-try probably helps nothing return; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2592fd35ec..c098c23ef4 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -39,6 +39,7 @@ #include "llagent.h" #include "llagentcamera.h" +#include "llcommandhandler.h" #include "llcommunicationchannel.h" #include "llfloaterreg.h" #include "llhudicon.h" @@ -1396,7 +1397,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi { if (drop) { - LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), "clicked", NULL, true ); + LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, true ); return LLWindowCallbacks::DND_MOVE; } return LLWindowCallbacks::DND_COPY; @@ -1865,7 +1866,7 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) LLMediaCtrl* web = NULL; const bool trusted_browser = false; // don't treat slapps coming from external browsers as "clicks" as this would bypass throttling - if (LLURLDispatcher::dispatch(url, "", web, trusted_browser)) + if (LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_EXTERNAL, web, trusted_browser)) { // bring window to foreground, as it has just been "launched" from a URL mWindow->bringToFront(); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 06bc9c1db3..4978e9bb84 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -147,6 +147,7 @@ LLVoiceClient::LLVoiceClient(LLPumpIO *pump) LLVoiceClient::~LLVoiceClient() { + llassert(!mVoiceModule); } void LLVoiceClient::init(LLPumpIO *pump) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 55fa48387a..f55bde7133 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -2011,7 +2011,7 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask ) // Invoke the event details floater if someone is clicking on an event. LLSD params(LLSD::emptyArray()); params.append(event_id); - LLCommandDispatcher::dispatch("event", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, "clicked", true); + LLCommandDispatcher::dispatch("event", params, LLSD(), LLGridManager::getInstance()->getGrid(), NULL, LLCommandHandler::NAV_TYPE_CLICKED, true); break; } case MAP_ITEM_LAND_FOR_SALE: diff --git a/indra/newview/skins/ansastorm/xui/de/floater_preview_texture.xml b/indra/newview/skins/ansastorm/xui/de/floater_preview_texture.xml index e92c308005..54a274082d 100644 --- a/indra/newview/skins/ansastorm/xui/de/floater_preview_texture.xml +++ b/indra/newview/skins/ansastorm/xui/de/floater_preview_texture.xml @@ -58,9 +58,9 @@ -