From 6308743fd2c9fde30277c7c63aeeacd8facd9419 Mon Sep 17 00:00:00 2001 From: Drake Arconis Date: Fri, 8 Feb 2019 19:26:28 -0800 Subject: [PATCH 001/107] Fix issue where gamma was being corrupted on windows with night light enabled --- indra/llwindow/llwindowwin32.cpp | 24 ++++++++++++++++++++---- indra/llwindow/llwindowwin32.h | 5 +++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 504c1589b0..27787a51a8 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -425,6 +425,9 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks, mKeyVirtualKey = 0; mhDC = NULL; mhRC = NULL; + memset(mCurrentGammaRamp, 0, sizeof(mCurrentGammaRamp)); + memset(mPrevGammaRamp, 0, sizeof(mPrevGammaRamp)); + mCustomGammaSet = FALSE; if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &mMouseVanish, 0)) { @@ -2989,13 +2992,26 @@ F32 LLWindowWin32::getGamma() BOOL LLWindowWin32::restoreGamma() { - return SetDeviceGammaRamp(mhDC, mPrevGammaRamp); + if (mCustomGammaSet != FALSE) + { + mCustomGammaSet = FALSE; + return SetDeviceGammaRamp(mhDC, mPrevGammaRamp); + } + return TRUE; } BOOL LLWindowWin32::setGamma(const F32 gamma) { mCurrentGamma = gamma; + //Get the previous gamma ramp to restore later. + if (mCustomGammaSet == FALSE) + { + if (GetDeviceGammaRamp(mhDC, mPrevGammaRamp) == FALSE) + return FALSE; + mCustomGammaSet = TRUE; + } + LL_DEBUGS("Window") << "Setting gamma to " << gamma << LL_ENDL; for ( int i = 0; i < 256; ++i ) @@ -3007,9 +3023,9 @@ BOOL LLWindowWin32::setGamma(const F32 gamma) if ( value > 0xffff ) value = 0xffff; - mCurrentGammaRamp [ 0 * 256 + i ] = - mCurrentGammaRamp [ 1 * 256 + i ] = - mCurrentGammaRamp [ 2 * 256 + i ] = ( WORD )value; + mCurrentGammaRamp[0][i] = + mCurrentGammaRamp[1][i] = + mCurrentGammaRamp[2][i] = (WORD) value; }; return SetDeviceGammaRamp ( mhDC, mCurrentGammaRamp ); diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index d72623a6f4..9cd16eb993 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -184,8 +184,9 @@ protected: F32 mCurrentGamma; U32 mFSAASamples; - WORD mPrevGammaRamp[256*3]; - WORD mCurrentGammaRamp[256*3]; + WORD mPrevGammaRamp[3][256]; + WORD mCurrentGammaRamp[3][256]; + BOOL mCustomGammaSet; LPWSTR mIconResource; BOOL mMousePositionModified; From 4e86486129accad9993863c4b4cea9fecf8b7360 Mon Sep 17 00:00:00 2001 From: Beq Date: Thu, 23 May 2019 14:09:38 +0100 Subject: [PATCH 002/107] Fix unreachable code warning --- indra/newview/lllogchat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 7ebaa856f1..3af69d799f 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -846,7 +846,7 @@ bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id, bool is_group) file_name = makeLogFileName(file_name); return isTranscriptFileFound(makeLogFileName(file_name)); } - return false; + //return false; // Unreachable code } bool LLLogChat::isNearbyTranscriptExist() From 482e9e642d39eedd656384fbe1f9139cebe5ad2e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 26 May 2019 12:08:37 +0200 Subject: [PATCH 003/107] FIRE-24023: Separate account directories per grid on Havok builds as well --- indra/llvfs/lldir.cpp | 31 ++++++++----------------------- indra/llvfs/lldir.h | 9 +++------ indra/newview/llstartup.cpp | 18 ++++++------------ 3 files changed, 17 insertions(+), 41 deletions(-) diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 8905cef552..e90de09a6e 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -961,12 +961,9 @@ std::string LLDir::getForbiddenFileChars() { return "\\/:*?\"<>|"; } -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid +//void LLDir::setLindenUserDir(const std::string &username) void LLDir::setLindenUserDir(const std::string &username, const std::string &gridname) -#else -void LLDir::setLindenUserDir(const std::string &username) -#endif // OPENSIM // { // if the username isn't set, that's bad @@ -977,21 +974,17 @@ void LLDir::setLindenUserDir(const std::string &username) std::string userlower(username); LLStringUtil::toLower(userlower); LLStringUtil::replaceChar(userlower, ' ', '_'); -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid std::string gridlower(gridname); LLStringUtil::toLower(gridlower); LLStringUtil::replaceChar(gridlower, ' ', '_'); -#endif // OPENSIM // mLindenUserDir = add(getOSUserAppDir(), userlower); -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid if (!gridname.empty() && gridlower != "second_life") { mLindenUserDir += "." + gridlower; } -#endif // OPENSIM // } else @@ -1019,12 +1012,9 @@ void LLDir::updatePerAccountChatLogsDir() mPerAccountChatLogsDir = add(getChatLogsDir(), mUserName); } -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid +//void LLDir::setPerAccountChatLogsDir(const std::string &username) void LLDir::setPerAccountChatLogsDir(const std::string &username, const std::string &gridname) -#else -void LLDir::setPerAccountChatLogsDir(const std::string &username) -#endif // OPENSIM // { // if both first and last aren't set, assume we're grabbing the cached dir @@ -1035,24 +1025,19 @@ void LLDir::setPerAccountChatLogsDir(const std::string &username) std::string userlower(username); LLStringUtil::toLower(userlower); LLStringUtil::replaceChar(userlower, ' ', '_'); -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid std::string gridlower(gridname); LLStringUtil::toLower(gridlower); LLStringUtil::replaceChar(gridlower, ' ', '_'); -#endif // OPENSIM // mUserName = userlower; updatePerAccountChatLogsDir(); -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid if (!gridname.empty() && gridlower != "second_life") { mPerAccountChatLogsDir += "." + gridlower; } -#endif // OPENSIM // - } else { diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index d4ff3c4cb3..37237f7f17 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -230,14 +230,11 @@ class LLDir virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid + //virtual void setPerAccountChatLogsDir(const std::string &username); // Set the per user chat log directory. + //virtual void setLindenUserDir(const std::string &username); // Set the linden user dir to this user's dir virtual void setPerAccountChatLogsDir(const std::string &username, const std::string &gridname); virtual void setLindenUserDir(const std::string &username, const std::string &gridname); -#else - virtual void setPerAccountChatLogsDir(const std::string &username); // Set the per user chat log directory. - virtual void setLindenUserDir(const std::string &username); // Set the linden user dir to this user's dir -#endif // OPENSIM // // [SL:KB] - Patch: Viewer-Skins | Checked: 2010-10-20 (Catznip-3.4) virtual void setSkinFolder(const std::string& skin_folder, const std::string& theme_folder, const std::string& language); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fa5d3ff64c..72f800de07 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1399,13 +1399,10 @@ bool idle_startup() // create necessary directories // *FIX: these mkdir's should error check -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid + //gDirUtilp->setLindenUserDir(userid, gridlabel); std::string gridlabel = LLGridManager::getInstance()->getGridLabel(); - gDirUtilp->setLindenUserDir(userid, gridlabel); -#else - gDirUtilp->setLindenUserDir(userid); -#endif // OPENSIM + gDirUtilp->setLindenUserDir(userid, LLGridManager::getInstance()->getGridLabel()); // LLFile::mkdir(gDirUtilp->getLindenUserDir()); @@ -1473,13 +1470,10 @@ bool idle_startup() gSavedPerAccountSettings.setString("SnapshotBaseName", gSavedPerAccountSettings.getControl("SnapshotBaseName")->getDefault().asString()); } // -// Seperate user directories per grid on OS build -#ifdef OPENSIM +// Seperate user directories per grid + //gDirUtilp->setPerAccountChatLogsDir(userid); gDirUtilp->setPerAccountChatLogsDir(userid, gridlabel); -#else - gDirUtilp->setPerAccountChatLogsDir(userid); -#endif // OPENSIM -// +// LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); From 987b890df8c53d06ec1c3f83d2add00e8a5fa259 Mon Sep 17 00:00:00 2001 From: Nicky Date: Tue, 28 May 2019 00:12:49 +0200 Subject: [PATCH 004/107] KDU update. --- autobuild.xml | 16 ++++++++-------- indra/llkdu/llkdumem.h | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index af8af36969..01265ae189 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2024,9 +2024,9 @@ archive hash - 544cc1f91d27be5fd3bffba3f686b3fa + e4e79a414a3b942d04473c1ee0f98bb7 url - file:///opt/firestorm/kdu-7.A.6-linux-183540937.tar.bz2 + file:///opt/firestorm/kdu-7.A.7-linux-191472043.tar.bz2 name linux @@ -2036,9 +2036,9 @@ archive hash - 544cc1f91d27be5fd3bffba3f686b3fa + e4e79a414a3b942d04473c1ee0f98bb7 url - file:///opt/firestorm/kdu-7.A.6-linux-183540937.tar.bz2 + file:///opt/firestorm/kdu-7.A.7-linux-191472043.tar.bz2 name linux64 @@ -2048,9 +2048,9 @@ archive hash - a369edcd42d975b49328df1163c2eee7 + a86b3a2fba5d62c42c26fd17ef7804d6 url - file:///c:/cygwin/opt/firestorm/kdu-7.A.6-windows-183521837.tar.bz2 + file:///c:/cygwin/opt/firestorm/kdu-7.A.7-windows-191472028.tar.bz2 name windows @@ -2060,9 +2060,9 @@ archive hash - a369edcd42d975b49328df1163c2eee7 + a86b3a2fba5d62c42c26fd17ef7804d6 url - file:///c:/cygwin/opt/firestorm/kdu-7.A.6-windows-183521837.tar.bz2 + file:///c:/cygwin/opt/firestorm/kdu-7.A.7-windows-191472028.tar.bz2 name windows64 diff --git a/indra/llkdu/llkdumem.h b/indra/llkdu/llkdumem.h index 8d24bd2415..5ed5fe085b 100644 --- a/indra/llkdu/llkdumem.h +++ b/indra/llkdu/llkdumem.h @@ -47,6 +47,7 @@ #include "include_kdu_xxxx.h" #include "kdu_sample_processing.h" +#include "kdu_utils.h" #include "image_local.h" #include "stdtypes.h" From f5f9786d3ab4bde195a35f68b002785bd4f76556 Mon Sep 17 00:00:00 2001 From: Nicky Date: Tue, 28 May 2019 00:41:35 +0200 Subject: [PATCH 005/107] KDU update for OSX. --- autobuild.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 01265ae189..16f78127f9 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2000,9 +2000,9 @@ archive hash - 9a08c678a8c6c3c10bb913219b7931b6 + 534ea1079513a56a78c99bc08179c87c url - file:///opt/firestorm/kdu-7.A.6-darwin-183562147.tar.bz2 + file:///opt/firestorm/kdu-7.A.7-darwin-191472236.tar.bz2 name darwin @@ -2012,9 +2012,9 @@ archive hash - 9a08c678a8c6c3c10bb913219b7931b6 + 534ea1079513a56a78c99bc08179c87c url - file:///opt/firestorm/kdu-7.A.6-darwin-183562147.tar.bz2 + file:///opt/firestorm/kdu-7.A.7-darwin-191472236.tar.bz2 name darwin64 From 61a6beb2e82434fc30352879a615551412d02b4c Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 29 May 2019 00:21:57 +0100 Subject: [PATCH 006/107] BUG-227041 Camera distance to avatar in neighboring region incorrect --- indra/newview/lldrawable.cpp | 39 +++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index b8a98ece4d..b02b461aff 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -919,30 +919,45 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) //if (volume->getAvatar() && volume->getAvatar()->isControlAvatar()) if (volume->getAvatar()) { - const LLVector3* av_box = volume->getAvatar()->getLastAnimExtents(); - LLVector3d cam_pos = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()); - LLVector3 cam_region_pos = LLVector3(cam_pos - volume->getRegion()->getOriginGlobal()); + // BUG-227041 Fix bad camera position calc forces LOD0 display on non-rigged attachments + // TODO: (maybe) Fixing this proved another bug, Rigged mesh attachments have the distance calcualted here then ignored. + // TODO: A further fix might be to remove this entirely in favour of calcLOD, waiting on Vir/Oz to reply. + // const LLVector3* av_box = volume->getAvatar()->getLastAnimExtents(); + // LLVector3d cam_pos = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()); + // LLVector3 cam_region_pos = LLVector3(cam_pos - volume->getRegion()->getOriginGlobal()); - LLVector3 cam_to_box_offset = point_to_box_offset(cam_region_pos, av_box); + // LLVector3 cam_to_box_offset = point_to_box_offset(cam_region_pos, av_box); + // mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); + // LL_DEBUGS("DynamicBox") << volume->getAvatar()->getFullname() + // << " pos (ignored) " << pos + // << " cam pos " << cam_pos + // << " cam region pos " << cam_region_pos + // << " box " << av_box[0] << "," << av_box[1] + // << " -> dist " << mDistanceWRTCamera + // << LL_ENDL; + const LLVector3* av_box = volume->getAvatar()->getLastAnimExtents(); + LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin(); + LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box); mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); LL_DEBUGS("DynamicBox") << volume->getAvatar()->getFullname() - << " pos (ignored) " << pos - << " cam pos " << cam_pos - << " cam region pos " << cam_region_pos - << " box " << av_box[0] << "," << av_box[1] - << " -> dist " << mDistanceWRTCamera - << LL_ENDL; + << " pos (ignored) " << pos + << " cam pos " << cam_pos_from_agent + << " box " << av_box[0] << "," << av_box[1] + << " -> dist " << mDistanceWRTCamera + << LL_ENDL; + // mVObjp->updateLOD(); return; } - } else { pos = LLVector3(getPositionGroup().getF32ptr()); } - pos -= camera.getOrigin(); + + pos -= camera.getOrigin(); + mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f); mVObjp->updateLOD(); } From c4e7fd6711ab3e0853af64356e6e995461a59823 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 30 May 2019 07:34:03 +0200 Subject: [PATCH 007/107] Some minor rewording for the "avatar health" menu option in Polish translation --- .../newview/skins/default/xui/pl/menu_viewer.xml | 2 +- indra/newview/skins/default/xui/pl/strings.xml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 291b17dd16..d29a484cfb 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -24,7 +24,7 @@ - + diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index f6c62505aa..68dc7b4721 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -5888,19 +5888,19 @@ do sekcji wsparcia witryny SecondLife.com i zgłoś problem. Most LSL nie został utworzony. Skrypt Mostu nie może zostać utworzony. - Most LSL nie został utworzony, bo jest nazwany niepoprawnie. Spróbuj stworzyć go na nowo ('Naprawa awatara' w menu 'Awatar' na górze). + Most LSL nie został utworzony, bo jest nazwany niepoprawnie. Spróbuj stworzyć go na nowo ('Kondycja awatara' w menu 'Awatar' na górze). - Most LSL nie został utworzony, bo nie może zostać znaleziony w Szafie. Spróbuj stworzyć go na nowo ('Naprawa awatara' w menu 'Awatar' na górze). + Most LSL nie został utworzony, bo nie może zostać znaleziony w Szafie. Spróbuj stworzyć go na nowo ('Kondycja awatara' w menu 'Awatar' na górze). - Most LSL nie mógł zostać założony na awatara, bo nie jest w aktualnej wersji. Spróbuj stworzyć go na nowo ('Naprawa awatara' w menu 'Awatar' na górze). + Most LSL nie mógł zostać założony na awatara, bo nie jest w aktualnej wersji. Spróbuj stworzyć go na nowo ('Kondycja awatara' w menu 'Awatar' na górze). - Most LSL nie mógł zostać założony na awatara, bo nie został znaleziony w odpowiednim miejscu Szafy. Spróbuj stworzyć go na nowo ('Naprawa awatara' w menu 'Awatar' na górze). + Most LSL nie mógł zostać założony na awatara, bo nie został znaleziony w odpowiednim miejscu Szafy. Spróbuj stworzyć go na nowo ('Kondycja awatara' w menu 'Awatar' na górze). - Most LSL nie mógł zostać założony na awatara, bo coś innego używa punktu zaczepu dodatku zarezerwowanego dla niego. Spróbuj stworzyć go na nowo ('Naprawa awatara' w menu 'Awatar' na górze). + Most LSL nie mógł zostać założony na awatara, bo coś innego używa punktu zaczepu dodatku zarezerwowanego dla niego. Spróbuj stworzyć go na nowo ('Kondycja awatara' w menu 'Awatar' na górze). Obiekt Mostu LSL nie mógł zostać znaleziony. Nie można kontynuować procesu jego tworzenia, kończę operację. @@ -5909,7 +5909,7 @@ do sekcji wsparcia witryny SecondLife.com i zgłoś problem. Wewnątrz Mostu LSL znaleziono nieoczekiwane elementy. - Proces tworzenia Mostu LSL nie dobiegł do końca. Być może będzie trzeba utworzyć go na nowo, aby zadział ('Naprawa awatara' w menu 'Awatar' na górze). + Proces tworzenia Mostu LSL nie dobiegł do końca. Być może będzie trzeba utworzyć go na nowo, aby zadział ('Kondycja awatara' w menu 'Awatar' na górze). Most LSL został odłączony od awatara. @@ -5952,10 +5952,10 @@ Twoja aktualna pozycja: [AVATAR_POS] Info o skryptach: Otrzymano uszkodzoną odpowiedź od Mostu LSL. Spróbuj ponownie. - UWAGA: Jeden lub więcej skryptów zostało dodanych do Twojego Mostu LSL Firestorma! Jeśli ta wiadomość jest niespodziewana, to stwórz teraz Most LSL na nowo ('Naprawa awatara' w menu 'Awatar' na górze). + UWAGA: Jeden lub więcej skryptów zostało dodanych do Twojego Mostu LSL Firestorma! Jeśli ta wiadomość jest niespodziewana, to stwórz teraz Most LSL na nowo ('Kondycja awatara' w menu 'Awatar' na górze). - UWAGA: Skrypt Mostu LSL używa starej maszyny wirtualnej LSO (16 KB limitu pamięci) zamiast nowej Mono, co stwarza wysokie prawdopodobieństwo kolizji sterty i stosu oraz awarii Mostu poprzez wyczerpanie się pamięci. Spróbuj stworzyć go na nowo ('Naprawa awatara' w menu 'Awatar' na górze). Jeśli ten komunikat pojawi się ponownie spróbuj jeszcze raz w innym regionie. + UWAGA: Skrypt Mostu LSL używa starej maszyny wirtualnej LSO (16 KB limitu pamięci) zamiast nowej Mono, co stwarza wysokie prawdopodobieństwo kolizji sterty i stosu oraz awarii Mostu poprzez wyczerpanie się pamięci. Spróbuj stworzyć go na nowo ('Kondycja awatara' w menu 'Awatar' na górze). Jeśli ten komunikat pojawi się ponownie spróbuj jeszcze raz w innym regionie. Pole widzenia From aa87f75ece2dfb87bf3d68a34186d79aa27c3bd9 Mon Sep 17 00:00:00 2001 From: Tonya Souther Date: Fri, 31 May 2019 06:27:10 -0500 Subject: [PATCH 008/107] Silence Cmake 3.11+ OpenGl warning. --- indra/cmake/OpenGL.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 2259c99293..9f3e4ee63f 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -3,6 +3,10 @@ include(Variables) include(Prebuilt) +# Shut cmake up about OpenGL library preference. This can +# be either LEGACY or GLVND. +SET(OpenGL_GL_PREFERENCE LEGACY) + if (BUILD_HEADLESS) SET(OPENGL_glu_LIBRARY GLU) SET(OPENGL_HEADLESS_LIBRARIES OSMesa16 dl GLU) From d63376e42027e6632ab85a514587703ba8ca336b Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 31 May 2019 18:10:50 +0300 Subject: [PATCH 009/107] SL-11324 FIXED Accidental deletion of Marketplace Listings folder possible --- indra/newview/llinventorybridge.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2b85c62edb..056322f0a3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2528,7 +2528,7 @@ public: // Can be destroyed (or moved to trash) BOOL LLFolderBridge::isItemRemovable() const { - if (!get_is_category_removable(getInventoryModel(), mUUID)) + if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder()) { return FALSE; } @@ -2544,11 +2544,6 @@ BOOL LLFolderBridge::isItemRemovable() const return FALSE; } } - - if (isMarketplaceListingsFolder() && LLMarketplaceData::instance().getActivationState(mUUID)) - { - return FALSE; - } return TRUE; } From 059e1c8cf5334ecee40293f3b5e7c4f9b5e10fee Mon Sep 17 00:00:00 2001 From: Tonya Souther Date: Fri, 31 May 2019 13:06:27 -0500 Subject: [PATCH 010/107] Backing out previous changeset since pulling it in annoyed some folks. --- indra/newview/llinventorybridge.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 056322f0a3..2b85c62edb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2528,7 +2528,7 @@ public: // Can be destroyed (or moved to trash) BOOL LLFolderBridge::isItemRemovable() const { - if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder()) + if (!get_is_category_removable(getInventoryModel(), mUUID)) { return FALSE; } @@ -2544,6 +2544,11 @@ BOOL LLFolderBridge::isItemRemovable() const return FALSE; } } + + if (isMarketplaceListingsFolder() && LLMarketplaceData::instance().getActivationState(mUUID)) + { + return FALSE; + } return TRUE; } From b0baac12321b603ada8ffebcba938486b226658a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 31 May 2019 20:07:37 +0200 Subject: [PATCH 011/107] Keep Linux-specific stuff Linux-specific --- indra/cmake/OpenGL.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 9f3e4ee63f..3cb47a072c 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -5,7 +5,9 @@ include(Prebuilt) # Shut cmake up about OpenGL library preference. This can # be either LEGACY or GLVND. -SET(OpenGL_GL_PREFERENCE LEGACY) +if (LINUX) + SET(OpenGL_GL_PREFERENCE LEGACY) +endif (LINUX) if (BUILD_HEADLESS) SET(OPENGL_glu_LIBRARY GLU) From 36a2de2353fa6128f0a0f0f403f482dc525bb76b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 31 May 2019 20:12:17 +0200 Subject: [PATCH 012/107] Special request by Keli: Add output device selection for inworld sounds (only available with FMOD Studio!) Selecting "Default" will always select the first output device; if the available devices change and the previous default device isn't available anymore, the viewer automatically switches to the new default device (depends on the OS which gets the new default one!). Selecting a particular device will NOT automatically switch to another device if it isn't available anymore (preferences will show "Unavailable device"), but will switch back to this device once it becomes available again. Yank this change before Firestorm releases it and I will gladly yank your unreleased stuff! --- indra/llaudio/llaudioengine.cpp | 12 ++ indra/llaudio/llaudioengine.h | 19 +++ indra/llaudio/llaudioengine_fmodstudio.cpp | 135 +++++++++++++++--- indra/llaudio/llaudioengine_fmodstudio.h | 8 ++ indra/newview/CMakeLists.txt | 5 +- indra/newview/app_settings/settings.xml | 11 ++ indra/newview/llfloaterpreference.cpp | 100 ++++++++++++- indra/newview/llfloaterpreference.h | 24 ++++ indra/newview/llstartup.cpp | 3 + indra/newview/llviewercontrol.cpp | 13 ++ .../xui/de/panel_preferences_sound.xml | 20 ++- .../default/xui/en/floater_preferences.xml | 2 +- .../xui/en/panel_preferences_sound.xml | 55 +++++++ .../xui/en/floater_preferences.xml | 2 +- .../vintage/xui/en/floater_preferences.xml | 2 +- 15 files changed, 389 insertions(+), 22 deletions(-) diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 9eb6867a3f..2cb9f40a26 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -1294,6 +1294,18 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E gAudiop->startNextTransfer(); } +// Output device selection +//virtual +LLAudioEngine::output_device_map_t LLAudioEngine::getDevices() +{ + return output_device_map_t(); +} + +void LLAudioEngine::OnOutputDeviceListChanged(output_device_map_t output_device_map) +{ + mOutputDeviceListChangedCallback(output_device_map); +} +// // // LLAudioSource implementation diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index 3bc8c81a04..3e2bf542fb 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -41,6 +41,8 @@ #include "lllistener.h" +#include // Output device selection + const F32 LL_WIND_UPDATE_INTERVAL = 0.1f; const F32 LL_WIND_UNDERWATER_CENTER_FREQ = 20.f; @@ -193,6 +195,20 @@ public: void startNextTransfer(); static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status); + // Output device selection + typedef std::map output_device_map_t; + virtual output_device_map_t getDevices(); + virtual void setDevice(const LLUUID& device_uuid) { }; + + typedef boost::signals2::signal output_device_list_changed_callback_t; + boost::signals2::connection setOutputDeviceListChangedCallback(const output_device_list_changed_callback_t::slot_type& cb) + { + return mOutputDeviceListChangedCallback.connect(cb); + } + + void OnOutputDeviceListChanged(output_device_map_t output_device_map); + // + friend class LLPipeline; // For debugging public: F32 mMaxWindGain; // Hack. Public to set before fade in? @@ -258,6 +274,9 @@ protected: LLFrameTimer mWindUpdateTimer; + // Output device selection + output_device_list_changed_callback_t mOutputDeviceListChangedCallback; + private: void setDefaults(); LLStreamingAudioInterface *mStreamingAudioImpl; diff --git a/indra/llaudio/llaudioengine_fmodstudio.cpp b/indra/llaudio/llaudioengine_fmodstudio.cpp index e55485bb02..2bd17d8d6a 100644 --- a/indra/llaudio/llaudioengine_fmodstudio.cpp +++ b/indra/llaudio/llaudioengine_fmodstudio.cpp @@ -51,25 +51,12 @@ FMOD_RESULT F_CALLBACK windDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffe FMOD::ChannelGroup *LLAudioEngine_FMODSTUDIO::mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT] = {0}; -LLAudioEngine_FMODSTUDIO::LLAudioEngine_FMODSTUDIO(bool enable_profiler, U32 resample_method) - : mInited(false) - , mWindGen(NULL) - , mWindDSPDesc(NULL) - , mWindDSP(NULL) - , mSystem(NULL) - , mEnableProfiler(enable_profiler) - , mResampleMethod(resample_method) -{ -} - -LLAudioEngine_FMODSTUDIO::~LLAudioEngine_FMODSTUDIO() -{ -} - static inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string) { - if(result == FMOD_OK) + if (result == FMOD_OK) + { return false; + } if (result != FMOD_ERR_INVALID_HANDLE) { @@ -83,6 +70,85 @@ static inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string) return true; } +LLUUID FMOD_GUID_to_LLUUID(FMOD_GUID guid) +{ + return LLUUID(llformat("%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7])); +} + +void set_device(FMOD::System* system, const LLUUID& device_uuid) +{ + LL_INFOS() << "LLAudioEngine_FMODSTUDIO::setDevice with device_uuid=" << device_uuid << LL_ENDL; + + int drivercount; + if (!Check_FMOD_Error(system->getNumDrivers(&drivercount), "FMOD::System::getNumDrivers") && drivercount > 0) + { + if (device_uuid.isNull()) + { + LL_INFOS() << "Setting driver \"Default\"" << LL_ENDL; + Check_FMOD_Error(system->setDriver(0), "FMOD::System::setDriver"); + } + else + { + FMOD_GUID guid; + int r_samplerate, r_channels; + + for (int i = 0; i < drivercount; ++i) + { + system->getDriverInfo(i, NULL, 0, &guid, &r_samplerate, NULL, &r_channels); + LLUUID driver_guid = FMOD_GUID_to_LLUUID(guid); + + if (driver_guid == device_uuid) + { + LL_INFOS() << "Setting driver " << i << ": " << driver_guid << LL_ENDL; + Check_FMOD_Error(system->setDriver(i), "FMOD::System::setDriver"); + return; + } + } + + LL_INFOS() << "Device not available (anymore) - falling back to default" << LL_ENDL; + Check_FMOD_Error(system->setDriver(0), "FMOD::System::setDriver"); + } + } +} + +FMOD_RESULT F_CALLBACK systemCallback(FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK_TYPE type, void *commanddata1, void *commanddata2, void* userdata) +{ + FMOD::System* sys = (FMOD::System*)system; + LLAudioEngine_FMODSTUDIO* audio_engine = (LLAudioEngine_FMODSTUDIO*)userdata; + + switch (type) + { + case FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED: + LL_DEBUGS() << "FMOD system callback FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED" << LL_ENDL; + if (sys && audio_engine) + { + set_device(sys, audio_engine->getSelectedDeviceUUID()); + audio_engine->OnOutputDeviceListChanged(audio_engine->getDevices()); + } + break; + default: + break; + } + return FMOD_OK; +} + +LLAudioEngine_FMODSTUDIO::LLAudioEngine_FMODSTUDIO(bool enable_profiler, U32 resample_method) + : mInited(false) + , mWindGen(NULL) + , mWindDSPDesc(NULL) + , mWindDSP(NULL) + , mSystem(NULL) + , mEnableProfiler(enable_profiler) + , mResampleMethod(resample_method) + , mSelectedDeviceUUID() +{ +} + +LLAudioEngine_FMODSTUDIO::~LLAudioEngine_FMODSTUDIO() +{ +} + bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata) { U32 version; @@ -110,6 +176,9 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata) result = mSystem->setSoftwareChannels(num_channels + EXTRA_SOUND_CHANNELS); Check_FMOD_Error(result,"FMOD::System::setSoftwareChannels"); + Check_FMOD_Error(mSystem->setCallback(systemCallback), "FMOD::System::setCallback"); + Check_FMOD_Error(mSystem->setUserData(this), "FMOD::System::setUserData"); + FMOD_ADVANCEDSETTINGS adv_settings = { }; adv_settings.cbSize = sizeof(FMOD_ADVANCEDSETTINGS); switch (mResampleMethod) @@ -265,9 +334,43 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata) LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): initialization complete." << LL_ENDL; + getDevices(); // Purely to print out available devices for debugging reasons + return true; } +//virtual +LLAudioEngine_FMODSTUDIO::output_device_map_t LLAudioEngine_FMODSTUDIO::getDevices() +{ + output_device_map_t driver_map; + + int drivercount; + int r_samplerate, r_channels; + char r_name[512]; + FMOD_GUID guid; + + if (!Check_FMOD_Error(mSystem->getNumDrivers(&drivercount), "FMOD::System::getNumDrivers")) + { + for (int i = 0; i < drivercount; ++i) + { + memset(r_name, 0, 512); + mSystem->getDriverInfo(i, r_name, 511, &guid, &r_samplerate, NULL, &r_channels); + LLUUID driver_guid = FMOD_GUID_to_LLUUID(guid); + driver_map.insert(std::make_pair(driver_guid, r_name)); + + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::getDevices(): r_name=\"" << r_name << "\" - guid: " << driver_guid << LL_ENDL; + } + } + + return driver_map; +} + +//virtual +void LLAudioEngine_FMODSTUDIO::setDevice(const LLUUID& device_uuid) +{ + mSelectedDeviceUUID = device_uuid; + set_device(mSystem, device_uuid); +} std::string LLAudioEngine_FMODSTUDIO::getDriverName(bool verbose) { diff --git a/indra/llaudio/llaudioengine_fmodstudio.h b/indra/llaudio/llaudioengine_fmodstudio.h index fb1b8ae2cd..3b80f45336 100644 --- a/indra/llaudio/llaudioengine_fmodstudio.h +++ b/indra/llaudio/llaudioengine_fmodstudio.h @@ -71,6 +71,12 @@ public: typedef F32 MIXBUFFERFORMAT; FMOD::System *getSystem() const {return mSystem;} + + /*virtual*/ std::map getDevices(); + /*virtual*/ void setDevice(const LLUUID& device_uuid); + + LLUUID getSelectedDeviceUUID() const { return mSelectedDeviceUUID; } + protected: /*virtual*/ LLAudioBuffer *createBuffer(); // Get a free buffer, or flush an existing one if you have to. /*virtual*/ LLAudioChannel *createChannel(); // Create a new audio channel. @@ -87,6 +93,8 @@ protected: bool mEnableProfiler; U32 mResampleMethod; + LLUUID mSelectedDeviceUUID; + public: static FMOD::ChannelGroup *mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT]; }; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a02e339317..a14682ea90 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2097,7 +2097,10 @@ if (FMODEX) set(FMODWRAPPER_LIBRARY ${FMODEX_LIBRARY}) endif (FMODEX) -set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +# Output device selection +# set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +set_source_files_properties(llstartup.cpp llfloaterpreference.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +# list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0a551bf21a..a2b206e722 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25192,6 +25192,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSOutputDeviceUUID + + Comment + UUID of the output device used for inworld sound playback + Persist + 1 + Type + String + Value + 00000000-0000-0000-0000-000000000000 + diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a27f67e30f..dc0981da77 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -140,6 +140,7 @@ #include "fsfloaterimcontainer.h" #include "growlmanager.h" #include "lfsimfeaturehandler.h" +#include "llaudioengine.h" // Output device selection #include "llavatarname.h" // Deeper name cache stuffs #include "lleventtimer.h" #include "lldiriterator.h" // for populating the fonts combo @@ -5930,6 +5931,103 @@ void LLPanelPreferenceOpensim::onClickPickDebugSearchURL() LLNotificationsUtil::add("ConfirmPickDebugSearchURL", LLSD(), LLSD(),callback_pick_debug_search ); } - #endif // OPENSIM // + +// Output device selection +static LLPanelInjector t_pref_sounds("panel_preference_sounds"); + +FSPanelPreferenceSounds::FSPanelPreferenceSounds() : + LLPanelPreference(), + mOutputDevicePanel(nullptr), + mOutputDeviceComboBox(nullptr), + mOutputDeviceListChangedConnection() +{ } + +FSPanelPreferenceSounds::~FSPanelPreferenceSounds() +{ + if (mOutputDeviceListChangedConnection.connected()) + { + mOutputDeviceListChangedConnection.disconnect(); + } +} + +BOOL FSPanelPreferenceSounds::postBuild() +{ + mOutputDevicePanel = findChild("output_device_settings_panel"); + mOutputDeviceComboBox = findChild("sound_output_device"); + +#ifdef LL_FMODSTUDIO + if (gAudiop && mOutputDevicePanel && mOutputDeviceComboBox) + { + gSavedSettings.getControl("FSOutputDeviceUUID")->getSignal()->connect(boost::bind(&FSPanelPreferenceSounds::onOutputDeviceChanged, this, _2)); + + mOutputDeviceListChangedConnection = gAudiop->setOutputDeviceListChangedCallback(boost::bind(&FSPanelPreferenceSounds::onOutputDeviceListChanged, this, _1)); + onOutputDeviceListChanged(gAudiop->getDevices()); + + mOutputDeviceComboBox->setCommitCallback(boost::bind(&FSPanelPreferenceSounds::onOutputDeviceSelectionChanged, this, _2)); + } +#else + if (mOutputDevicePanel) + { + mOutputDevicePanel->setVisible(FALSE); + } +#endif + + return LLPanelPreference::postBuild(); +} + +void FSPanelPreferenceSounds::onOutputDeviceChanged(const LLSD& new_value) +{ + mOutputDeviceComboBox->setSelectedByValue(new_value.asUUID(), TRUE); +} + +void FSPanelPreferenceSounds::onOutputDeviceSelectionChanged(const LLSD& new_value) +{ + gSavedSettings.setString("FSOutputDeviceUUID", mOutputDeviceComboBox->getSelectedValue().asString()); +} + +void FSPanelPreferenceSounds::onOutputDeviceListChanged(LLAudioEngine::output_device_map_t output_devices) +{ + LLUUID selected_device(gSavedSettings.getString("FSOutputDeviceUUID")); + mOutputDeviceComboBox->removeall(); + + if (output_devices.empty()) + { + LL_INFOS() << "No output devices available" << LL_ENDL; + mOutputDeviceComboBox->add(mOutputDevicePanel->getString("output_no_device"), LLUUID::null); + + if (selected_device != LLUUID::null) + { + LL_INFOS() << "Non-default device selected - adding unavailable for " << selected_device << LL_ENDL; + mOutputDeviceComboBox->add(mOutputDevicePanel->getString("output_device_unavailable"), selected_device); + } + } + else + { + bool selected_device_found = false; + + mOutputDeviceComboBox->add(mOutputDevicePanel->getString("output_default_text"), LLUUID::null); + selected_device_found = selected_device == LLUUID::null; + + for (auto device : output_devices) + { + mOutputDeviceComboBox->add(device.second.empty() ? mOutputDevicePanel->getString("output_name_no_device") : device.second, device.first); + + if (!selected_device_found && device.first == selected_device) + { + LL_INFOS() << "Found selected device \"" << device.second << "\" (" << device.first << ")" << LL_ENDL; + selected_device_found = true; + } + } + + if (!selected_device_found) + { + LL_INFOS() << "Selected device " << selected_device << " NOT found - adding unavailable" << LL_ENDL; + mOutputDeviceComboBox->add(mOutputDevicePanel->getString("output_device_unavailable"), selected_device); + } + } + + mOutputDeviceComboBox->setSelectedByValue(selected_device, TRUE); +} +// diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 599f9fea6b..dd9f2dbd5f 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -38,6 +38,8 @@ #include "llconversationlog.h" #include "llsearcheditor.h" +#include "llaudioengine.h" // Output device selection + class LLConversationLogObserver; class LLPanelPreference; class LLPanelLCD; @@ -543,6 +545,28 @@ private: // #endif // OPENSIM // +// Output device selection +class FSPanelPreferenceSounds : public LLPanelPreference +{ +public: + FSPanelPreferenceSounds(); + virtual ~FSPanelPreferenceSounds(); + + BOOL postBuild(); + +private: + LLPanel* mOutputDevicePanel; + LLComboBox* mOutputDeviceComboBox; + + void onOutputDeviceChanged(const LLSD& new_value); + void onOutputDeviceSelectionChanged(const LLSD& new_value); + void onOutputDeviceListChanged(LLAudioEngine::output_device_map_t output_devices); + boost::signals2::connection mOutputDeviceListChangedConnection; + + LOG_CLASS(FSPanelPreferenceSounds); +}; +// + class LLFloaterPreferenceProxy : public LLFloater { public: diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 72f800de07..8fad732e58 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1022,6 +1022,9 @@ bool idle_startup() bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); if(init) { + // Output device selection + gAudiop->setDevice(LLUUID(gSavedSettings.getString("FSOutputDeviceUUID"))); + gAudiop->setMuted(TRUE); } else diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index b52b8a5733..72c0e950fe 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -954,6 +954,16 @@ void handleFSStatisticsNoFocusChanged(const LLSD& newvalue) } // +// Output device selection +void handleOutputDeviceChanged(const LLSD& newvalue) +{ + if (gAudiop) + { + gAudiop->setDevice(newvalue.asUUID()); + } +} +// + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -1192,6 +1202,9 @@ void settings_setup_listeners() // Add ability for the statistics window to not be able to receive focus gSavedSettings.getControl("FSStatisticsNoFocus")->getSignal()->connect(boost::bind(&handleFSStatisticsNoFocusChanged, _2)); // + + // Output device selection + gSavedSettings.getControl("FSOutputDeviceUUID")->getSignal()->connect(boost::bind(&handleOutputDeviceChanged, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml index 9653acc7ac..14fffb3f3b 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml @@ -27,7 +27,25 @@ Schwellwert für L$-Änderung: - + + + Standard + + + Kein Gerät vorhanden + + + Unbenanntes Gerät + + + Gerät nicht verfügbar + + + Ausgabegerät: + + + + diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 578b5a7b90..cf35a3163f 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -126,7 +126,7 @@ https://accounts.secondlife.com/change_email/ help_topic="preferences_display_tab" name="display" /> + + + Default + + + No device available + + + Unnamed device + + + Unavailable device + + + + Output device: + + + diff --git a/indra/newview/skins/starlightcui/xui/en/floater_preferences.xml b/indra/newview/skins/starlightcui/xui/en/floater_preferences.xml index b5ad5eb3bc..068240969f 100644 --- a/indra/newview/skins/starlightcui/xui/en/floater_preferences.xml +++ b/indra/newview/skins/starlightcui/xui/en/floater_preferences.xml @@ -133,7 +133,7 @@ https://accounts.secondlife.com/change_email/ help_topic="preferences_display_tab" name="display" /> Date: Fri, 31 May 2019 21:23:46 +0200 Subject: [PATCH 013/107] Fix some XUI warnings: * AvatarShadowDetail combobox was removed * Simply IFDEF'ing out LLPanelPreferenceOpensim on non-OS builds will just produce warnings while the panel itself is still being constructed by the XUI parser --- indra/newview/llfloaterpreference.cpp | 37 ++++++++++++--------------- indra/newview/llfloaterpreference.h | 5 ++-- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index dc0981da77..ddc3ef675c 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2180,9 +2180,6 @@ void LLFloaterPreference::refreshEnabledState() enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"); ctrl_shadow->setEnabled(enabled); - - LLComboBox* ctrl_avatar_shadow = getChild("AvatarShadowDetail"); - ctrl_avatar_shadow->setEnabled(enabled && ctrl_shadow->getValue().asInteger() > 0); // now turn off any features that are unavailable disableUnavailableSettings(); @@ -2394,7 +2391,6 @@ void LLFloaterPreference::disableUnavailableSettings() LLComboBox* ctrl_shadows = getChild("ShadowDetail"); LLCheckBoxCtrl* ctrl_ssao = getChild("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild("UseDoF"); - LLComboBox* ctrl_avatar_shadow = getChild("AvatarShadowDetail"); LLSliderCtrl* sky = getChild("SkyMeshDetail"); // if vertex shaders off, disable all shader related products @@ -2419,9 +2415,6 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - - ctrl_avatar_shadow->setEnabled(FALSE); - ctrl_avatar_shadow->setValue(0); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -2445,9 +2438,6 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - ctrl_avatar_shadow->setEnabled(FALSE); - ctrl_avatar_shadow->setValue(0); - ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -2464,9 +2454,6 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - - ctrl_avatar_shadow->setEnabled(FALSE); - ctrl_avatar_shadow->setValue(0); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -2490,9 +2477,6 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - - ctrl_avatar_shadow->setEnabled(FALSE); - ctrl_avatar_shadow->setValue(0); } // disabled reflections @@ -2514,9 +2498,6 @@ void LLFloaterPreference::disableUnavailableSettings() //deferred needs AvatarVP, disable deferred ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - - ctrl_avatar_shadow->setEnabled(FALSE); - ctrl_avatar_shadow->setValue(0); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -5718,9 +5699,9 @@ void LLFloaterPreference::populateFontSelectionCombo() // // -#ifdef OPENSIM static LLPanelInjector t_pref_opensim("panel_preference_opensim"); +#ifdef OPENSIM LLPanelPreferenceOpensim::LLPanelPreferenceOpensim() : LLPanelPreference(), mGridListControl(NULL) { @@ -5931,7 +5912,21 @@ void LLPanelPreferenceOpensim::onClickPickDebugSearchURL() LLNotificationsUtil::add("ConfirmPickDebugSearchURL", LLSD(), LLSD(),callback_pick_debug_search ); } -#endif // OPENSIM +#else +void no_cb() +{ } + +LLPanelPreferenceOpensim::LLPanelPreferenceOpensim() : LLPanelPreference() +{ + mCommitCallbackRegistrar.add("Pref.ClearDebugSearchURL", boost::bind(&no_cb)); + mCommitCallbackRegistrar.add("Pref.PickDebugSearchURL", boost::bind(&no_cb)); + mCommitCallbackRegistrar.add("Pref.AddGrid", boost::bind(&no_cb)); + mCommitCallbackRegistrar.add("Pref.ClearGrid", boost::bind(&no_cb)); + mCommitCallbackRegistrar.add("Pref.RefreshGrid", boost::bind(&no_cb)); + mCommitCallbackRegistrar.add("Pref.RemoveGrid", boost::bind(&no_cb)); + mCommitCallbackRegistrar.add("Pref.SaveGrid", boost::bind(&no_cb)); +} +#endif // // Output device selection diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index dd9f2dbd5f..19526a8945 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -499,12 +499,13 @@ private: LOG_CLASS(FSPanelPreferenceBackup); }; -#ifdef OPENSIM // // class LLPanelPreferenceOpensim : public LLPanelPreference { public: LLPanelPreferenceOpensim(); + +#ifdef OPENSIM // /*virtual*/ BOOL postBuild(); /*virtual*/ void apply(); @@ -539,11 +540,11 @@ private: LLLineEditor* mEditorPassword; LLLineEditor* mEditorSearch; LLLineEditor* mEditorGridMessage; +#endif LOG_CLASS(LLPanelPreferenceOpensim); }; // -#endif // OPENSIM // // Output device selection class FSPanelPreferenceSounds : public LLPanelPreference From 89d126baa6f11371b2cdf73b2c92b2aae20189c1 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 2 Jun 2019 11:34:48 +0200 Subject: [PATCH 014/107] Updated Polish translation --- .../default/xui/pl/panel_preferences_sound.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml index f4c66a1e19..45005720af 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml @@ -25,6 +25,23 @@ Próg zmiany ilości L$: + + + Domyślne + + + Brak urządzenia + + + Nienazwane urządzenie + + + Niedostępne urządzenie + + + Urządzenie wyjściowe: + + From 06fa762f21ec94766f4e92c6aeedb0fd59b8bab0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 2 Jun 2019 19:19:26 +0200 Subject: [PATCH 015/107] FIRE-24051: Fix removing resident from filtered blocklist sends viewer into loop --- indra/llui/llscrolllistctrl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 3bbb11a1ec..c06f408096 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -967,6 +967,7 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) // Fix for FS-specific people list (radar) if (isFiltered(itemp)) { + iter++ ; continue; } // Fix for FS-specific people list (radar) From 4a4e408e0b098238af866d3cae4950ff323324e1 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 2 Jun 2019 21:19:04 +0200 Subject: [PATCH 016/107] Add output device selection for inworld sounds for FMOD Ex as well --- indra/llaudio/llaudioengine_fmodex.cpp | 128 +++++++++++++++++++------ indra/llaudio/llaudioengine_fmodex.h | 11 +++ indra/newview/llfloaterpreference.cpp | 2 +- 3 files changed, 111 insertions(+), 30 deletions(-) diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp index 1eb3676e01..db34ffc19e 100644 --- a/indra/llaudio/llaudioengine_fmodex.cpp +++ b/indra/llaudio/llaudioengine_fmodex.cpp @@ -48,42 +48,77 @@ FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels); -// FIRE-11266 / BUG-3549 / MAINT-2983: Changing audio device now requires relog to restore sounds -#if LL_WINDOWS +// Output device selection +static inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string); + +LLUUID FMOD_GUID_to_LLUUID(FMOD_GUID guid) +{ + return LLUUID(llformat("%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7])); +} + +void set_device(FMOD::System* system, const LLUUID& device_uuid) +{ + LL_INFOS() << "LLAudioEngine_FMODEX::setDevice with device_uuid=" << device_uuid << LL_ENDL; + + int drivercount; + if (!Check_FMOD_Error(system->getNumDrivers(&drivercount), "FMOD::System::getNumDrivers") && drivercount > 0) + { + if (device_uuid.isNull()) + { + LL_INFOS() << "Setting driver \"Default\"" << LL_ENDL; + Check_FMOD_Error(system->setDriver(0), "FMOD::System::setDriver"); + } + else + { + FMOD_GUID guid; + + for (int i = 0; i < drivercount; ++i) + { + system->getDriverInfo(i, NULL, 0, &guid); + LLUUID driver_guid = FMOD_GUID_to_LLUUID(guid); + + if (driver_guid == device_uuid) + { + LL_INFOS() << "Setting driver " << i << ": " << driver_guid << LL_ENDL; + Check_FMOD_Error(system->setDriver(i), "FMOD::System::setDriver"); + return; + } + } + + LL_INFOS() << "Device not available (anymore) - falling back to default" << LL_ENDL; + Check_FMOD_Error(system->setDriver(0), "FMOD::System::setDriver"); + } + } +} + FMOD_RESULT F_CALLBACK systemCallback(FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACKTYPE type, void *commanddata1, void *commanddata2) { - FMOD::System *sys = (FMOD::System *)system; - FMOD_RESULT result; + FMOD::System* sys = (FMOD::System*)system; + LLAudioEngine_FMODEX* audio_engine = NULL; + if (sys) + { + void* userdata = NULL; + Check_FMOD_Error(sys->getUserData(&userdata), "FMOD::System::getUserData"); + audio_engine = (LLAudioEngine_FMODEX*)userdata; + } + switch (type) { case FMOD_SYSTEM_CALLBACKTYPE_DEVICELISTCHANGED: - { - int drivers; - sys->getNumDrivers(&drivers); - - if (drivers <= 0) + LL_DEBUGS() << "FMOD system callback FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED" << LL_ENDL; + if (sys && audio_engine) { - break; - } - - for (int i = 0; i < drivers; ++i) - { - result = sys->setDriver(i); - if (result == FMOD_OK) - { - break; - } + set_device(sys, audio_engine->getSelectedDeviceUUID()); + audio_engine->OnOutputDeviceListChanged(audio_engine->getDevices()); } break; - } - default: break; } return FMOD_OK; } -#endif -// +// > FMOD::ChannelGroup *LLAudioEngine_FMODEX::mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT] = {0}; @@ -95,6 +130,7 @@ LLAudioEngine_FMODEX::LLAudioEngine_FMODEX(bool enable_profiler) mSystem = NULL; mEnableProfiler = enable_profiler; mWindDSPDesc = new FMOD_DSP_DESCRIPTION(); + mSelectedDeviceUUID == LLUUID::null; // Output device selection } @@ -182,12 +218,10 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) result = mSystem->setSoftwareChannels(num_channels + 2); Check_FMOD_Error(result,"FMOD::System::setSoftwareChannels"); - // FIRE-11266 / BUG-3549 / MAINT-2983: Changing audio device now requires relog to restore sounds - #if LL_WINDOWS - result = mSystem->setCallback(systemCallback); - Check_FMOD_Error(result, "FMOD::System::setCallback"); - #endif - // + // Output device selection + Check_FMOD_Error(mSystem->setCallback(systemCallback), "FMOD::System::setCallback"); + Check_FMOD_Error(mSystem->setUserData(this), "FMOD::System::setUserData"); + // U32 fmod_flags = FMOD_INIT_NORMAL; if(mEnableProfiler) @@ -369,9 +403,45 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) LL_INFOS("AppInit") << "LLAudioEngine_FMODEX::init(): initialization complete." << LL_ENDL; + // Output device selection + getDevices(); // Purely to print out available devices for debugging reasons + return true; } +// Output device selection +//virtual +LLAudioEngine_FMODEX::output_device_map_t LLAudioEngine_FMODEX::getDevices() +{ + output_device_map_t driver_map; + + int drivercount; + char r_name[512]; + FMOD_GUID guid; + + if (!Check_FMOD_Error(mSystem->getNumDrivers(&drivercount), "FMOD::System::getNumDrivers")) + { + for (int i = 0; i < drivercount; ++i) + { + memset(r_name, 0, 512); + mSystem->getDriverInfo(i, r_name, 511, &guid); + LLUUID driver_guid = FMOD_GUID_to_LLUUID(guid); + driver_map.insert(std::make_pair(driver_guid, r_name)); + + LL_INFOS("AppInit") << "LLAudioEngine_FMODEX::getDevices(): r_name=\"" << r_name << "\" - guid: " << driver_guid << LL_ENDL; + } + } + + return driver_map; +} + +//virtual +void LLAudioEngine_FMODEX::setDevice(const LLUUID& device_uuid) +{ + mSelectedDeviceUUID = device_uuid; + set_device(mSystem, device_uuid); +} +// std::string LLAudioEngine_FMODEX::getDriverName(bool verbose) { diff --git a/indra/llaudio/llaudioengine_fmodex.h b/indra/llaudio/llaudioengine_fmodex.h index ca389d489f..d0de2d602a 100644 --- a/indra/llaudio/llaudioengine_fmodex.h +++ b/indra/llaudio/llaudioengine_fmodex.h @@ -65,6 +65,14 @@ public: typedef F32 MIXBUFFERFORMAT; FMOD::System *getSystem() const {return mSystem;} + + // Output device selection + /*virtual*/ std::map getDevices(); + /*virtual*/ void setDevice(const LLUUID& device_uuid); + + LLUUID getSelectedDeviceUUID() const { return mSelectedDeviceUUID; } + // + protected: /*virtual*/ LLAudioBuffer *createBuffer(); // Get a free buffer, or flush an existing one if you have to. /*virtual*/ LLAudioChannel *createChannel(); // Create a new audio channel. @@ -80,6 +88,9 @@ protected: FMOD::System *mSystem; bool mEnableProfiler; + // Output device selection + LLUUID mSelectedDeviceUUID; + public: static FMOD::ChannelGroup *mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT]; }; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ddc3ef675c..23f74eba39 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -5952,7 +5952,7 @@ BOOL FSPanelPreferenceSounds::postBuild() mOutputDevicePanel = findChild("output_device_settings_panel"); mOutputDeviceComboBox = findChild("sound_output_device"); -#ifdef LL_FMODSTUDIO +#if LL_FMODSTUDIO || LL_FMODEX if (gAudiop && mOutputDevicePanel && mOutputDeviceComboBox) { gSavedSettings.getControl("FSOutputDeviceUUID")->getSignal()->connect(boost::bind(&FSPanelPreferenceSounds::onOutputDeviceChanged, this, _2)); From a4a8f7e228363f9965464fd5b7c2cd39887b1d13 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 5 Jun 2019 13:11:39 +0100 Subject: [PATCH 017/107] FIRE-19734/BUG-227094 Persistent notification cache causes UDP high rate spam on startup Add a simple request time cache to prevent spam --- indra/newview/llgroupmgr.cpp | 47 ++++++++++++++++++++++++++++++++++-- indra/newview/llgroupmgr.h | 11 +++++++-- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index fcfcfcd12b..b3524e141f 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1137,7 +1137,17 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) group_datap->mGroupPropertiesDataComplete = true; group_datap->mChanged = TRUE; - + // FIRE-19734/BUG-227094 stop persistent notification recovery spam + auto request = LLGroupMgr::getInstance()->mPropRequests.find(group_id); + if (request != LLGroupMgr::getInstance()->mPropRequests.end()) + { + LLGroupMgr::getInstance()->mPropRequests.erase(request); + } + else + { + LL_DEBUGS() << "GroupPropertyResponse received with no pending request. Response was slow." << LL_ENDL; + } + // LLGroupMgr::getInstance()->notifyObservers(GC_PROPERTIES); } @@ -1507,6 +1517,30 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id) return group_datap; } +// FIRE-19734/BUG-227094 stop persistent notification recovery spam +bool LLGroupMgr::hasPendingPropertyRequest(const LLUUID & id) +{ + auto existing_req = LLGroupMgr::getInstance()->mPropRequests.find(id); + if (existing_req != LLGroupMgr::getInstance()->mPropRequests.end()) + { + if (gFrameTime - existing_req->second < MIN_GROUP_PROPERTY_REQUEST_FREQ) + { + return true; + } + else + { + LLGroupMgr::getInstance()->mPropRequests.erase(existing_req); + } + } + return false; +} + +void LLGroupMgr::addPendingPropertyRequest(const LLUUID& id) +{ + LLGroupMgr::getInstance()->mPropRequests[id] = gFrameTime; +} +// + void LLGroupMgr::notifyObservers(LLGroupChange gc) { for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end(); ++gi) @@ -1592,7 +1626,13 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) LL_DEBUGS() << "LLGroupMgr::sendGroupPropertiesRequest" << LL_ENDL; // This will happen when we get the reply //LLGroupMgrGroupData* group_datap = createGroupData(group_id); - + // FIRE-19734/BUG-227094 stop persistent notification recovery spam + if (LLGroupMgr::getInstance()->hasPendingPropertyRequest(group_id)) + { + LL_DEBUGS() << "LLGroupMgr::sendGroupPropertiesRequest suppressed repeat for " << group_id << LL_ENDL; + return; + } + // LLMessageSystem* msg = gMessageSystem; msg->newMessage("GroupProfileRequest"); msg->nextBlock("AgentData"); @@ -1601,6 +1641,9 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) msg->nextBlock("GroupData"); msg->addUUID("GroupID",group_id); gAgent.sendReliableMessage(); + // FIRE-19734/BUG-227094 stop persistent notification recovery spam + LLGroupMgr::getInstance()->addPendingPropertyRequest(group_id); + // } void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 94c5df67eb..6bcd9de3f5 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -453,13 +453,20 @@ private: void notifyObserver(const LLUUID& group_id, LLGroupChange gc); void addGroup(LLGroupMgrGroupData* group_datap); LLGroupMgrGroupData* createGroupData(const LLUUID &id); - + // FIRE-19734/BUG-227094 stop persistent notification recovery spam + bool hasPendingPropertyRequest(const LLUUID& id); + void addPendingPropertyRequest(const LLUUID& id); + // typedef std::multimap observer_multimap_t; observer_multimap_t mObservers; typedef std::map group_map_t; group_map_t mGroups; - + // FIRE-19734/BUG-227094 stop persistent notification recovery spam + const U64MicrosecondsImplicit MIN_GROUP_PROPERTY_REQUEST_FREQ = 100000;//100ms between requests should be enough to avoid spamming. + typedef std::map properties_request_map_t; + properties_request_map_t mPropRequests; + // typedef std::set observer_set_t; typedef std::map observer_map_t; observer_map_t mParticularObservers; From dd05edde989df014677fed672c9191384429ca24 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 8 Jun 2019 15:00:23 +0200 Subject: [PATCH 018/107] FMOD Studio 2.00.01 for Windows --- autobuild.xml | 10 +++++----- indra/cmake/Copy3rdPartyLibs.cmake | 10 ++-------- indra/cmake/FMODSTUDIO.cmake | 12 +++--------- indra/newview/viewer_manifest.py | 10 ++-------- 4 files changed, 12 insertions(+), 30 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 16f78127f9..53fbcfc017 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1048,11 +1048,11 @@ archive hash - 9aa1b6789b0f30943599f48c0fedefa1 + f44299c9cf9c4224c6aee350284c3175 hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-1.10.13-windows-191311251.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.01-windows-191591202.tar.bz2 name windows @@ -1062,18 +1062,18 @@ archive hash - 7e6e5b4bc012e0f91c71c481aa4657fb + fd45c9663bbd413f779b3bd5ad6f3567 hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-1.10.13-windows64-191311303.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.01-windows64-191591204.tar.bz2 name windows64 version - 1.10.13 + 2.00.01 fmodex diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index b03bfc104e..b59eb675ce 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -65,17 +65,11 @@ if(WINDOWS) set(release_files ${release_files} growl++.dll growl.dll ) if (FMODSTUDIO) - if(ADDRESS_SIZE EQUAL 32) - set(debug_files ${debug_files} fmodL.dll) - set(release_files ${release_files} fmod.dll) - else(ADDRESS_SIZE EQUAL 32) - set(debug_files ${debug_files} fmodL64.dll) - set(release_files ${release_files} fmod64.dll) - endif(ADDRESS_SIZE EQUAL 32) + set(debug_files ${debug_files} fmodL.dll) + set(release_files ${release_files} fmod.dll) endif (FMODSTUDIO) if (FMODEX) - if(ADDRESS_SIZE EQUAL 32) set(release_files ${release_files} fmodex.dll) else(ADDRESS_SIZE EQUAL 32) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 7200a7da7b..ddef4046a3 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -27,15 +27,9 @@ if (FMODSTUDIO) include(Prebuilt) use_prebuilt_binary(fmodstudio) if (WINDOWS) - if (ADDRESS_SIZE EQUAL 32) - set(FMODSTUDIO_LIBRARY - debug fmodL_vc - optimized fmod_vc) - elseif (ADDRESS_SIZE EQUAL 64) - set(FMODSTUDIO_LIBRARY - debug fmodL64_vc - optimized fmod64_vc) - endif(ADDRESS_SIZE EQUAL 32) + set(FMODSTUDIO_LIBRARY + debug fmodL_vc + optimized fmod_vc) elseif (DARWIN) set(FMODSTUDIO_LIBRARY debug fmodL diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 43b61eabb5..c8e96913f6 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -602,15 +602,9 @@ class WindowsManifest(ViewerManifest): # Get fmodstudio dll, continue if missing try: if self.args['configuration'].lower() == 'debug': - if(self.address_size == 64): - self.path("fmodL64.dll") - else: - self.path("fmodL.dll") + self.path("fmodL.dll") else: - if(self.address_size == 64): - self.path("fmod64.dll") - else: - self.path("fmod.dll") + self.path("fmod.dll") except: print "Skipping fmodstudio audio library (assuming other audio engine)" From 406d70108aa016b9e0b9801f406c8c38ade1f930 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 8 Jun 2019 15:30:31 +0200 Subject: [PATCH 019/107] Only pull in OpenJPEG if really needed. --- indra/llimagej2coj/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index c9423d50dd..0e487b1d66 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -2,6 +2,9 @@ project(llimagej2coj) +# when using KDU, why compile the OpenJPEG library? +if (NOT USE_KDU) + include(00-Common) include(LLCommon) include(LLImage) @@ -29,9 +32,9 @@ set_source_files_properties(${llimagej2coj_HEADER_FILES} list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES}) add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) - target_link_libraries( llimagej2coj ${OPENJPEG_LIBRARIES} ) +endif() From e83c9ea31e735230aeca76962c91ffc4bb292044 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 8 Jun 2019 15:41:53 +0200 Subject: [PATCH 020/107] Linux/OSX FMod Studio 2.0.1 --- autobuild.xml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 53fbcfc017..c9ccc209d8 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1006,39 +1006,25 @@ archive hash - 33d23a2167b58bd880f2cd3ce63501d7 + 46c6881c26c05d9ab0c2b3bb7c4697f8 hash_algorithm md5 url - file:///opt/firestorm/fmodstudio-1.10.13-darwin-191311419.tar.bz2 + file:///opt/firestorm/fmodstudio-2.00.01-darwin-191591326.tar.bz2 name darwin - linux - - archive - - hash - 7c0f5ff940be5b5a9c08446351d2c588 - hash_algorithm - md5 - url - file:///opt/firestorm/fmodstudio-1.10.11-linux-190370440.tar.bz2 - - name - linux - linux64 archive hash - d1ef7f3d30bf2126620a37630b615ecf + 31bb00cc4514778a3cd083baebbf0f60 hash_algorithm md5 url - file:///opt/firestorm/fmodstudio-1.10.13-linux64-191311416.tar.bz2 + file:///opt/firestorm/fmodstudio-2.00.01-linux-191591325.tar.bz2 name linux64 From 59e6b496daaa8cb9d822cb138e36194e98c6e133 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 9 Jun 2019 20:26:57 +0200 Subject: [PATCH 021/107] Put in the correct Linux x64 package. --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index c9ccc209d8..ccf7a65cc3 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1020,11 +1020,11 @@ archive hash - 31bb00cc4514778a3cd083baebbf0f60 + 9111641e2b915c64529ed9624c1e9eb7 hash_algorithm md5 url - file:///opt/firestorm/fmodstudio-2.00.01-linux-191591325.tar.bz2 + file:///opt/firestorm/fmodstudio-2.00.01-linux64-191601723.tar.bz2 name linux64 From 1ba1900d9341a7c2a0b261a4a6d7152cdfe8db4a Mon Sep 17 00:00:00 2001 From: Liny Date: Tue, 11 Jun 2019 01:09:24 -0700 Subject: [PATCH 022/107] FIRE-23606 Reveal path to external script editor in prefernces --- indra/newview/llfloaterpreference.cpp | 80 +++++++++++++++++++ indra/newview/llfloaterpreference.h | 4 + .../xui/en/panel_preferences_firestorm.xml | 35 +++++++- 3 files changed, 118 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 23f74eba39..feeff5be1b 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -143,6 +143,7 @@ #include "llaudioengine.h" // Output device selection #include "llavatarname.h" // Deeper name cache stuffs #include "lleventtimer.h" +#include "llviewermenufile.h" // FIRE-23606 Reveal path to external script editor in prefernces #include "lldiriterator.h" // for populating the fonts combo #include "llline.h" #include "llpanelblockedlist.h" @@ -161,6 +162,13 @@ #include #endif +// FIRE-23606 Reveal path to external script editor in prefernces +#if LL_DARWIN +#include +#include // [FS:CR] +#endif +// + // FIRE-6340, FIRE-6567 - Setting Bandwidth issues //const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f; char const* const VISIBILITY_DEFAULT = "default"; @@ -572,6 +580,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) // mCommitCallbackRegistrar.add("NACL.AntiSpamUnblock", boost::bind(&LLFloaterPreference::onClickClearSpamList, this)); mCommitCallbackRegistrar.add("NACL.SetPreprocInclude", boost::bind(&LLFloaterPreference::setPreprocInclude, this)); + // FIRE-23606 Reveal path to external script editor in prefernces + mCommitCallbackRegistrar.add("Pref.SetExternalEditor", boost::bind(&LLFloaterPreference::setExternalEditor, this)); //[ADD - Clear Settings : SJ] mCommitCallbackRegistrar.add("Pref.ClearSettings", boost::bind(&LLFloaterPreference::onClickClearSettings, this)); mCommitCallbackRegistrar.add("Pref.Online_Notices", boost::bind(&LLFloaterPreference::onClickChatOnlineNotices, this)); @@ -1872,6 +1882,76 @@ void LLFloaterPreference::changePreprocIncludePath(const std::vector FIRE-23606 Reveal path to external script editor in prefernces +void LLFloaterPreference::setExternalEditor() +{ + std::string cur_name(gSavedSettings.getString("ExternalEditor")); + std::string proposed_name(cur_name); + + (new LLFilePickerReplyThread(boost::bind(&LLFloaterPreference::changeExternalEditorPath, this, _1), LLFilePicker::FFLOAD_EXE, false))->getFile(); +} + +void LLFloaterPreference::changeExternalEditorPath(const std::vector& filenames) +{ + const std::string chosen_path = filenames[0]; + std::string executable_path = chosen_path; +#if LL_DARWIN + // on Mac, if it's an application bundle, figure out the actual path from the Info.plist file + CFStringRef path_cfstr = CFStringCreateWithCString(kCFAllocatorDefault, chosen_path.c_str(), kCFStringEncodingMacRoman); // get path as a CFStringRef + CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, TRUE); // turn it into a CFURLRef + CFBundleRef chosen_bundle = CFBundleCreate(kCFAllocatorDefault, path_url); // get a handle for the bundle + CFRelease(path_url); // [FS:CR] Don't leave a mess clean up our objects after we use them + if (NULL != chosen_bundle) + { + CFDictionaryRef bundleInfoDict = CFBundleGetInfoDictionary(chosen_bundle); // get the bundle's dictionary + CFRelease(chosen_bundle); // [FS:CR] Don't leave a mess clean up our objects after we use them + if (NULL != bundleInfoDict) + { + CFStringRef executable_cfstr = (CFStringRef)CFDictionaryGetValue(bundleInfoDict, CFSTR("CFBundleExecutable")); // get the name of the actual executable (e.g. TextEdit or firefox-bin) + int max_file_length = 256; // (max file name length is 255 in OSX) + char executable_buf[max_file_length]; + if (CFStringGetCString(executable_cfstr, executable_buf, max_file_length, kCFStringEncodingMacRoman)) // convert CFStringRef to char* + { + executable_path += std::string("/Contents/MacOS/") + std::string(executable_buf); // append path to executable directory and then executable name to exec path + } + else + { + std::string warning = "Unable to get CString from CFString for executable path"; + popupAndPrintWarning(warning); + } + } + else + { + std::string warning = "Unable to get bundle info dictionary from application bundle"; + popupAndPrintWarning(warning); + } + } + else + { + if (-1 != executable_path.find(".app")) // only warn if this path actually had ".app" in it, i.e. it probably just wasn'nt an app bundle and that's okay + { + std::string warning = std::string("Unable to get bundle from path \"") + chosen_path + std::string("\""); + popupAndPrintWarning(warning); + } + } + +#endif + { + std::string bin = executable_path; + if (!bin.empty()) + { + // surround command with double quotes for the case if the path contains spaces + if (bin.find("\"") == std::string::npos) + { + bin = "\"" + bin + "\""; + } + executable_path = bin; + } + } + gSavedSettings.setString("ExternalEditor", executable_path); +} +// + //[FIX JIRA-1971 : SJ] Show an notify when Javascript setting change void LLFloaterPreference::onClickJavascript() { diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 19526a8945..cd37b48ebf 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -200,6 +200,10 @@ public: void onClickPreviewUISound(const LLSD& ui_sound_id); // FIRE-8190: Preview function for "UI Sounds" Panel void setPreprocInclude(); void changePreprocIncludePath(const std::vector& filenames, std::string proposed_name); + // FIRE-23606 Reveal path to external script editor in prefernces + void setExternalEditor(); + void changeExternalEditorPath(const std::vector& filenames); + // void onClickEnablePopup(); void onClickDisablePopup(); void resetAllIgnored(); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml index d83d524cfe..5184c937e8 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml @@ -1375,7 +1375,7 @@ + + External Editor: + + + From 93f993fb92c4cb706bacbea64cb6ee579c760ec8 Mon Sep 17 00:00:00 2001 From: Liny Date: Tue, 11 Jun 2019 01:23:53 -0700 Subject: [PATCH 023/107] fix file picker EXE filtering --- indra/newview/llfilepicker.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 489c1a02cd..db95618bd0 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -68,6 +68,7 @@ LLFilePicker LLFilePicker::sInstance; //#define IMPORT_FILTER L"Import (*.oxp; *.hpa)\0*.oxp;*.hpa\0" #define IMPORT_FILTER L"Import (*.oxp)\0*.oxp\0" // +#define EXE_FILTER L"Programs (*.exe)\0*.exe\0" // fix file picker EXE filtering #endif #ifdef LL_DARWIN @@ -178,13 +179,22 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) switch (filter) { case FFLOAD_ALL: - case FFLOAD_EXE: + // fix file picker EXE filtering mOFN.lpstrFilter = L"All Files (*.*)\0*.*\0" \ SOUND_FILTER \ IMAGE_FILTER \ ANIM_FILTER \ L"\0"; break; + case FFLOAD_EXE: + // fix file picker EXE filtering + /*mOFN.lpstrFilter = L"All Files (*.*)\0*.*\0" \ + SOUND_FILTER \ + IMAGE_FILTER \ + ANIM_FILTER \*/ + mOFN.lpstrFilter = EXE_FILTER \ + L"\0"; + break; case FFLOAD_WAV: mOFN.lpstrFilter = SOUND_FILTER \ L"\0"; From 92c0e118ab4e2c1855c2c63e8aadfb1e5909d0fa Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 11 Jun 2019 20:05:31 +0200 Subject: [PATCH 024/107] Update German translation --- .../skins/default/xui/de/panel_preferences_firestorm.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml index ded49b8f20..7c5688a524 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml @@ -224,6 +224,10 @@ Include-Verzeichnis für Präprozessor: