diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-14 21:32:10 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-14 21:32:10 +0300 | 
| commit | 032c4a1b4999b117f53465e62bf932e62015a7fe (patch) | |
| tree | 979d4ce2b41029f53fea17585708fab4ba0af56a | |
| parent | 347c53855bb0c983e0300594772a9206f9031065 (diff) | |
SL-12607 WIP, take pre-sized icons from repo instead of package
| -rw-r--r-- | indra/llaudio/llaudioengine_fmodstudio.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llprogressview.cpp | 51 | ||||
| -rw-r--r-- | indra/newview/skins/default/textures/3p_icons/fmod_logo.png | bin | 0 -> 1732 bytes | |||
| -rw-r--r-- | indra/newview/skins/default/textures/3p_icons/havok_logo.png | bin | 0 -> 2586 bytes | |||
| -rw-r--r-- | indra/newview/skins/default/textures/3p_icons/vivox_logo.png | bin | 0 -> 1740 bytes | |||
| -rwxr-xr-x | indra/newview/viewer_manifest.py | 21 | 
6 files changed, 39 insertions, 54 deletions
diff --git a/indra/llaudio/llaudioengine_fmodstudio.cpp b/indra/llaudio/llaudioengine_fmodstudio.cpp index 06a5776eb1..70b3a08473 100644 --- a/indra/llaudio/llaudioengine_fmodstudio.cpp +++ b/indra/llaudio/llaudioengine_fmodstudio.cpp @@ -70,7 +70,7 @@ static inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string)  {      if (result == FMOD_OK)          return false; -    LL_DEBUGS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL; +    LL_DEBUGS("FMOD") << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL;      return true;  } @@ -97,8 +97,6 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata, cons              << " expected:" << FMOD_VERSION << LL_ENDL;      } -    // In case we need to force sampling on stereo, use setSoftwareFormat here -      // In this case, all sounds, PLUS wind and stream will be software.      result = mSystem->setSoftwareChannels(num_channels + 2);      Check_FMOD_Error(result, "FMOD::System::setSoftwareChannels"); @@ -193,6 +191,15 @@ bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata, cons      // number of channel in this case looks to be identiacal to number of max simultaneously      // playing objects and we can set practically any number      result = mSystem->init(num_channels + 2, fmod_flags, 0); +    if (Check_FMOD_Error(result, "Error initializing FMOD Studio with default settins, retrying with other format")) +    { +        result = mSystem->setSoftwareFormat(44100, FMOD_SPEAKERMODE_STEREO, 0/*- ignore*/); +        if (Check_FMOD_Error(result, "Error setting sotware format. Can't init.")) +        { +            return false; +        } +        result = mSystem->init(num_channels + 2, fmod_flags, 0); +    }      if (Check_FMOD_Error(result, "Error initializing FMOD Studio"))      {          // If it fails here and (result == FMOD_ERR_OUTPUT_CREATEBUFFER), @@ -251,7 +258,7 @@ void LLAudioEngine_FMODSTUDIO::allocateListener(void)      mListenerp = (LLListener *) new LLListener_FMODSTUDIO(mSystem);      if (!mListenerp)      { -        LL_WARNS() << "Listener creation failed" << LL_ENDL; +        LL_WARNS("FMOD") << "Listener creation failed" << LL_ENDL;      }  } @@ -260,16 +267,16 @@ void LLAudioEngine_FMODSTUDIO::shutdown()  {      stopInternetStream(); -    LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL; +    LL_INFOS("FMOD") << "About to LLAudioEngine::shutdown()" << LL_ENDL;      LLAudioEngine::shutdown(); -    LL_INFOS() << "LLAudioEngine_FMODSTUDIO::shutdown() closing FMOD Studio" << LL_ENDL; +    LL_INFOS("FMOD") << "LLAudioEngine_FMODSTUDIO::shutdown() closing FMOD Studio" << LL_ENDL;      if (mSystem)      {          mSystem->close();          mSystem->release();      } -    LL_INFOS() << "LLAudioEngine_FMODSTUDIO::shutdown() done closing FMOD Studio" << LL_ENDL; +    LL_INFOS("FMOD") << "LLAudioEngine_FMODSTUDIO::shutdown() done closing FMOD Studio" << LL_ENDL;      delete mListenerp;      mListenerp = NULL; diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index f745d26864..b51c791621 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -381,54 +381,50 @@ void LLProgressView::initLogos()      const U8 image_codec = IMG_CODEC_PNG;      const LLRectf default_clip(0.f, 1.f, 1.f, 0.f); -    const S32 default_height = 24; -    const S32 default_width = 91; +    const S32 default_height = 32;      const S32 default_pad = 7; +    S32 icon_width; +      // We don't know final screen rect yet, so we can't precalculate position fully      LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");      S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad;      S32 texture_start_y = -3; -    // Normally iamges stay in skins folder, but 3p images come from package instead -    // of repository and need special handling -#ifdef LL_WINDOWS -    std::string temp_str = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "3p_icons"); -#elif LL_DARWIN -    // On MAC use resource directory -    std::string temp_str = gDirUtilp->add(gDirUtilp->getAppRODataDir(), "3p_icons"); -#else -    std::string temp_str = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "3p_icons"); -#endif +    // Normally we would just preload these textures from textures.xml, +    // and display them via icon control, but they are only needed on +    // startup and preloaded/UI ones stay forever +    // (and this code was done already so simply reused it) +    std::string temp_str = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "textures", "3p_icons"); +      temp_str += gDirUtilp->getDirDelimiter();  #ifdef LL_FMODSTUDIO -    const S32 fmod_y_offset = 2; -    loadLogo(temp_str + "fmod.png", +    icon_width = 89; +    loadLogo(temp_str + "fmod_logo.png",          image_codec, -        LLRect(texture_start_x, texture_start_y + default_height + fmod_y_offset, texture_start_x + default_width + fmod_y_offset, texture_start_y), +        LLRect(texture_start_x, texture_start_y + default_height, texture_start_x + icon_width, texture_start_y),          default_clip,          default_clip); -    texture_start_x += default_width + default_pad; +    texture_start_x += icon_width + default_pad;  #endif +    icon_width = 100;      loadLogo(temp_str + "havok_logo.png",          image_codec, -        LLRect(texture_start_x, texture_start_y + default_height, texture_start_x + default_width, texture_start_y), +        LLRect(texture_start_x, texture_start_y + default_height, texture_start_x + icon_width, texture_start_y),          default_clip,          default_clip); -    texture_start_x += default_width + default_pad - 2; // offset to compensate for enormous borders for vivox +    texture_start_x += icon_width + default_pad; -    const LLRectf vivox_clip(0.0f /*repeats*/, 0.52f /*cut starting from center*/, 0.52f, 0.0f); // non-standard icon, clip it -    const LLRectf vivox_offset(0.0f, 0.23f, 0.23f, 0.0f); // keeping clipping identical to not mess up scale -    const S32 vivox_y_offset = -5; +    icon_width = 87;      loadLogo(temp_str + "vivox_logo.png",          image_codec, -        LLRect(texture_start_x, texture_start_y + default_height + vivox_y_offset, texture_start_x + default_width, texture_start_y + vivox_y_offset), -        vivox_clip, -        vivox_offset); +        LLRect(texture_start_x, texture_start_y + default_height, texture_start_x + icon_width, texture_start_y), +        default_clip, +        default_clip);  }  void LLProgressView::initStartTexture(S32 location_id, bool is_in_production) @@ -511,8 +507,11 @@ void LLProgressView::initTextures(S32 location_id, bool is_in_production)      initStartTexture(location_id, is_in_production);      initLogos(); -    LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl"); -    logos_label->setVisible(true); +    if (!mLogosList.empty()) +    { +        LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl"); +        logos_label->setVisible(true); +    }  }  void LLProgressView::releaseTextures() diff --git a/indra/newview/skins/default/textures/3p_icons/fmod_logo.png b/indra/newview/skins/default/textures/3p_icons/fmod_logo.png Binary files differnew file mode 100644 index 0000000000..5da146bfa9 --- /dev/null +++ b/indra/newview/skins/default/textures/3p_icons/fmod_logo.png diff --git a/indra/newview/skins/default/textures/3p_icons/havok_logo.png b/indra/newview/skins/default/textures/3p_icons/havok_logo.png Binary files differnew file mode 100644 index 0000000000..1b51e23ca0 --- /dev/null +++ b/indra/newview/skins/default/textures/3p_icons/havok_logo.png diff --git a/indra/newview/skins/default/textures/3p_icons/vivox_logo.png b/indra/newview/skins/default/textures/3p_icons/vivox_logo.png Binary files differnew file mode 100644 index 0000000000..6bbd050eae --- /dev/null +++ b/indra/newview/skins/default/textures/3p_icons/vivox_logo.png diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index de71a66519..572c84c396 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -497,13 +497,6 @@ class WindowsManifest(ViewerManifest):                      self.path("*.png")                      self.path("*.gif") -        # Copy 3p icons -        with self.prefix(src=os.path.join(pkgdir, "icons"), dst="3p_icons"): -            if self.args['fmodstudio'] == 'ON': -                self.path("fmod.png") -            self.path("havok_logo.png") -            self.path("vivox_logo.png") -          # Plugin host application          self.path2basename(os.path.join(os.pardir,                                          'llplugin', 'slplugin', self.args['configuration']), @@ -973,13 +966,6 @@ class DarwinManifest(ViewerManifest):                  with self.prefix(src=pkgdir,dst=""):                      self.path("ca-bundle.crt") -                # Copy 3p icons -                with self.prefix(src=os.path.join(pkgdir, "icons"), dst="3p_icons"): -                    if self.args['fmodstudio'] == 'ON': -                        self.path("fmod.png") -                    self.path("havok_logo.png") -                    self.path("vivox_logo.png") -                  # Translations                  self.path("English.lproj/language.txt")                  self.replace_in(src="English.lproj/InfoPlist.strings", @@ -1480,13 +1466,6 @@ class Linux_i686_Manifest(LinuxManifest):          relpkgdir = os.path.join(pkgdir, "lib", "release")          debpkgdir = os.path.join(pkgdir, "lib", "debug") -        # Copy 3p icons -        with self.prefix(src=os.path.join(pkgdir, "icons"), dst="3p_icons"): -            if self.args['fmodstudio'] == 'ON': -                self.path("fmod.png") -            self.path("havok_logo.png") -            self.path("vivox_logo.png") -          with self.prefix(src=relpkgdir, dst="lib"):              self.path("libapr-1.so")              self.path("libapr-1.so.0")  | 
