From 032c4a1b4999b117f53465e62bf932e62015a7fe Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 14 Apr 2020 21:32:10 +0300 Subject: [PATCH] SL-12607 WIP, take pre-sized icons from repo instead of package --- indra/llaudio/llaudioengine_fmodstudio.cpp | 21 +++++--- indra/newview/llprogressview.cpp | 51 +++++++++--------- .../default/textures/3p_icons/fmod_logo.png | Bin 0 -> 1732 bytes .../default/textures/3p_icons/havok_logo.png | Bin 0 -> 2586 bytes .../default/textures/3p_icons/vivox_logo.png | Bin 0 -> 1740 bytes indra/newview/viewer_manifest.py | 21 -------- 6 files changed, 39 insertions(+), 54 deletions(-) create mode 100644 indra/newview/skins/default/textures/3p_icons/fmod_logo.png create mode 100644 indra/newview/skins/default/textures/3p_icons/havok_logo.png create mode 100644 indra/newview/skins/default/textures/3p_icons/vivox_logo.png 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("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("logos_lbl"); - logos_label->setVisible(true); + if (!mLogosList.empty()) + { + LLTextBox *logos_label = getChild("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 new file mode 100644 index 0000000000000000000000000000000000000000..5da146bfa923f521fe081528780aad4a98be7f4a GIT binary patch literal 1732 zcmdUv`#aMM0LH&j$&jtNgdCT-XCa(fo6B4}TNt*5<&w%U<dEWQ)Jnzr%^D;g0KPiCJK>z?K;IPhweUkUB zeMEXc@f&)X`%t61_|l1yA#}zi8U?@vM_#6A<03AFQV5hw!Ex7x6f^)xo$+)dxhyU& zLLiWtnHd=wnVp@Ty1Kd}M~=wL%WG+Aef#ze1OmNz^QNb#XKQOqRaLd4qvPGXcZ!ON zOG``h^Ya`IM=Tc4&d%D{*dUQe9UUEAUES^NZA(kb@87?7cXul*D<3_2^w_auva+%x zBO`Kha!N`{6%`fZK!NKRxpLch6heDxtc6Rpm_9iAKK0ZFi#>Upx z))p2P8X6i33JQl0A10AVB9SODF>z{YYG7bsb8~ZTZSDR0_r=A<3kwTgUS4i)ZbL&u zSS(guT|F~1v%kOp_3PIZ3dPpe*2BZY%*-q|H+ODsZen6WAP_u${J6fpJ|-q6E-vok z#fuCE!^p@eBO`-AAP|YfSFc{7P^i88(~E<#OqCdV70&ZEfxS`}bKa z7L7(rNlB@$uFlWTcXf45OG}H2ii(boCX>lsU0qBjv#P2pC@5%eZ*PBN4F&gk`)HvP z@WlP*|102+zxp2lfV4Nx8AFO4U10n85HaAp(rs4SU`N*^tiw&SKFm#sr-M>?-yzb$ zlHps+&Fi0TF}}1SIgPT26SqNjvFY1UPZt)l;T(=v+jw}z-gKPs_kV}Zk%mjHmn7*h z9lXdfu=O4@B<5!}vp5JO@7f1G%PcDFnbu3*A$>&%;u z{w#R2@g5pKJ)eA6e*|($dfD7PC{!aw9e(rgSodUXp~C z@y?&WO!{Q7PZ@Hxf=~=+P4xN&|GE%dJck=%xtR1+Cb-*;JOR3~hLMuhJS#6+u4y*M zt(nxO-6W|X3PYORTRbQ7^6xSa=;#j&m3B5bV8m&2iGgxEN_O~OT4K3w&dPw3@P~=V zv&DlLrNxr6E0A(Szq*rG$BM`=ezKSg0Jyb-Ui1Yp^p^lV%L8*I?LXqW$a1g^%|ED5 zm@!pFpjB`6dg&}xI{Z57p{I9|Emji>Q1v*@7tGGy&^+-fvYvPTU_{fVAx)u#YHgzC zY$O8{edVKG5>ITOqoJp2n8hIumJv(ZNW#m)hgSB;r|+)Y!mSp-`8Pi0uImbECvow$ z6^pG+?WP-cpBWn3l_@JOcLQv*pOI@5w??@f_JFk2g`O0w$p{6`)+@NsaXsXe>q^)+ z-9^63mU?toopNrSauu=TKaTRJKx`?lsvpJ>z8|Kp%G8G7UUC1u^og2nwZM&S@^`>W}kiGmTZwd422YgKMm&yun%RKN;v6gPNv^E9uS+ZemMx zSqEO@4CLAgsnigdpK)@-6jQiU;H=Y1TW*th|p!b3#v2_h4Im(%IV_uQjo9yh1%PwGJ3n^}y7wP)5~Xth literal 0 HcmV?d00001 diff --git a/indra/newview/skins/default/textures/3p_icons/havok_logo.png b/indra/newview/skins/default/textures/3p_icons/havok_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1b51e23ca0c9d250241aeb971d4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W^3*F}RW2#U)!0sA;eEr0r#Z)M{P2f(X2B@Zv_$ z2>%RlSG5CE^wa`0Zyiy1K4bAg1myH4KPeIS>E@usfR4uQ@tp?x4f1Qr*^N#~D@5Ka zaDEL5`Ba~knAvLk9St)dGak1O9bP(hxgORgQ5iV;GcI1{w%h<~vcqpDYE9gHPJ@Qe zAq(==G@_%-AGPIhW*{@pIH<1*en z*#$iz5an;(TS)}!Gc0the@?4hk?C`Cw$f-s{pf76!QNRx`BC)wahEiYDJaXAS7k@IO+o8dLC9%?r=O7Q{v5fqi}9%chGE_KU<*&S*;{69}zGT`f^v2fl!|&9G?}S@w znOR_picA8tQc7k*84O#YUgnF}ZHg$B8s+ouUC%$C60`Mu{*`ttStkv+Q+_ndpH=C) zcY>2@NU-rWt-PjQDW5|#YY5_iRi;LX)y?MVj-1j2gE^iJT_K+i4@o6vRIw*^?=(qm zP{|a=(>|-L7Mf49suCc@T;ASzp;K(;6`>rCE6to(!5TA~I_JdiXSEE^w6JR$wx-`l j?21w{0s8Mt5dxso3kjMwGeLLvFAPLAG&iWa;1Kyg&O}9m literal 0 HcmV?d00001 diff --git a/indra/newview/skins/default/textures/3p_icons/vivox_logo.png b/indra/newview/skins/default/textures/3p_icons/vivox_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6bbd050eae4dbe934a40e0b47ad90178429b7a0f GIT binary patch literal 1740 zcmds$`8Sjc7{}jo$Ji#+gmLJqISh^ySuRt^HZiucotaybZ7fL&CuQp-%q?*X5mOW< zbZt=#QkEI6-H1jLV;Lb!67Jxg_kHjDaQ}+?J?Hy;&Uw!Fr{_H1d*|F8F>>m1003af zP7aY+OJz4X_Q43Z!X~BLhNdp0t4ATi1JOmH@E- z_BmH?5`w^Du^19VFoIN8R)QdiMx*8A8q@*Otef;>* z%F3#@w^u_$1A<@`6%`x~CoeDG)zzh=qtn#Xq^zvm(9j?&D|_e89S;wW&dyF4g4^5M z2?TQK?QJX;d-(9-Lx&C>IB-B(S{j4FEG#UHj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+ug5tI^BhESi+d)jtTxx~q|>7?1*njkewn TVP2e-)Eyv`+#PD{{8Rn~(n{wr literal 0 HcmV?d00001 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")