diff --git a/ElevenMPV-A/CONTENTS/empva_plugin.rco b/ElevenMPV-A/CONTENTS/empva_plugin.rco index 560ded0..46114a5 100644 Binary files a/ElevenMPV-A/CONTENTS/empva_plugin.rco and b/ElevenMPV-A/CONTENTS/empva_plugin.rco differ diff --git a/ElevenMPV-A/CONTENTS/sce_sys/icon0.png b/ElevenMPV-A/CONTENTS/sce_sys/icon0.png index 8d6b62c..6a9eb45 100644 Binary files a/ElevenMPV-A/CONTENTS/sce_sys/icon0.png and b/ElevenMPV-A/CONTENTS/sce_sys/icon0.png differ diff --git a/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/bg0.png b/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/bg0.png index 815da1b..1f04714 100644 Binary files a/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/bg0.png and b/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/bg0.png differ diff --git a/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/startup.png b/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/startup.png index ab80689..a65b6f2 100644 Binary files a/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/startup.png and b/ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/startup.png differ diff --git a/ElevenMPV-A/CONTENTS/sce_sys/pic0.png b/ElevenMPV-A/CONTENTS/sce_sys/pic0.png index 8437055..fccc9e3 100644 Binary files a/ElevenMPV-A/CONTENTS/sce_sys/pic0.png and b/ElevenMPV-A/CONTENTS/sce_sys/pic0.png differ diff --git a/ElevenMPV-A/include/common.h b/ElevenMPV-A/include/common.h index 27966f1..c75a9f4 100644 --- a/ElevenMPV-A/include/common.h +++ b/ElevenMPV-A/include/common.h @@ -29,6 +29,7 @@ extern widget::Widget *g_player_page; extern widget::Widget *g_settings_option; extern widget::Widget *g_top_text; extern graphics::Texture *g_commonBgTex; +extern graphics::Texture *g_coverBgTex; extern widget::BusyIndicator *g_commonBusyInidcator; extern widget::Widget *g_commonOptionDialog; diff --git a/ElevenMPV-A/param.sfx b/ElevenMPV-A/param.sfx index 7be64b2..853e555 100644 --- a/ElevenMPV-A/param.sfx +++ b/ElevenMPV-A/param.sfx @@ -1,6 +1,6 @@ - 05.04 + 05.05 17338504 17 0 diff --git a/ElevenMPV-A/source/audio/at3.cpp b/ElevenMPV-A/source/audio/at3.cpp index 1c09987..7af2bfb 100644 --- a/ElevenMPV-A/source/audio/at3.cpp +++ b/ElevenMPV-A/source/audio/at3.cpp @@ -168,7 +168,7 @@ SceVoid audio::At3Decoder::InitOMA(const char *path) delete text8; - if (ID3->ID3EncapsulatedPictureType == JPEG_IMAGE || ID3->ID3EncapsulatedPictureType == PNG_IMAGE) { + if ((ID3->ID3EncapsulatedPictureType == JPEG_IMAGE || ID3->ID3EncapsulatedPictureType == PNG_IMAGE) && !metadata->hasCover) { ret = file.Open(path, SCE_O_RDONLY, 0); if (ret >= 0) { @@ -181,6 +181,8 @@ SceVoid audio::At3Decoder::InitOMA(const char *path) file.Close(); coverLoader->size = ID3->ID3EncapsulatedPictureLength; coverLoader->Start(); + + metadata->hasCover = SCE_TRUE; } } } diff --git a/ElevenMPV-A/source/audio/audio.cpp b/ElevenMPV-A/source/audio/audio.cpp index 3b25cf1..ad19a71 100644 --- a/ElevenMPV-A/source/audio/audio.cpp +++ b/ElevenMPV-A/source/audio/audio.cpp @@ -24,6 +24,7 @@ SceVoid audio::PlayerCoverLoaderThread::EntryFunction() widget::Widget *playerCover; widget::BusyIndicator *playerBusyInd; widget::Widget::Color col; + SceFVector4 wsize; Misc::OpenResult fres; SceInt32 res; @@ -57,6 +58,13 @@ SceVoid audio::PlayerCoverLoaderThread::EntryFunction() col.b = 0.286; col.a = 1; g_root->SetFilterColor(&col); + + wsize.x = 960.0; + wsize.y = 960.0; + wsize.z = 0.0f; + wsize.w = 0.0f; + g_root->SetSize(&wsize); + g_root->SetTextureBase(&coverTex); } @@ -109,6 +117,13 @@ SceVoid audio::PlayerCoverLoaderThread::EntryFunction() col.b = 0.286; col.a = 1; g_root->SetFilterColor(&col); + + wsize.x = 960.0; + wsize.y = 960.0; + wsize.z = 0.0f; + wsize.w = 0.0f; + g_root->SetSize(&wsize); + g_root->SetTextureBase(&coverTex); playerCover->SetTextureBase(&coverTex); @@ -165,7 +180,7 @@ audio::GenericDecoder::~GenericDecoder() if (coverLoader->coverTex.texSurface != SCE_NULL) { searchParam.hash = EMPVAUtils::GetHash("plane_player_cover"); playerCover = g_player_page->GetChildByHash(&searchParam, 0); - playerCover->SetTextureBase(g_commonBgTex); + playerCover->SetTextureBase(g_coverBgTex); } delete coverLoader; diff --git a/ElevenMPV-A/source/audio/flac.cpp b/ElevenMPV-A/source/audio/flac.cpp index 845f1fc..5621636 100644 --- a/ElevenMPV-A/source/audio/flac.cpp +++ b/ElevenMPV-A/source/audio/flac.cpp @@ -24,7 +24,7 @@ SceVoid audio::FlacDecoder::MetadataCbEntry(ScePVoid pUserData, ScePVoid pMeta) String *text8 = new String(); drflac_metadata *pMetadata = (drflac_metadata *)pMeta; s_currentDecoderInstance->metadata->hasMeta = SCE_TRUE; - if (pMetadata->type == DRFLAC_METADATA_BLOCK_TYPE_PICTURE) { + if (pMetadata->type == DRFLAC_METADATA_BLOCK_TYPE_PICTURE && !s_currentDecoderInstance->metadata->hasCover) { if (pMetadata->data.picture.type == DRFLAC_PICTURE_TYPE_COVER_FRONT) { if (!sce_paf_strncasecmp("image/jpg", pMetadata->data.picture.mime, 9) || !sce_paf_strncasecmp("image/jpeg", pMetadata->data.picture.mime, 10) || diff --git a/ElevenMPV-A/source/audio/mp3.cpp b/ElevenMPV-A/source/audio/mp3.cpp index 3a3a7ff..800ebf3 100644 --- a/ElevenMPV-A/source/audio/mp3.cpp +++ b/ElevenMPV-A/source/audio/mp3.cpp @@ -41,7 +41,7 @@ audio::Mp3Decoder::Mp3Decoder(const char *path, SceBool isSwDecoderUsed) : Shell text8->Clear(); } - if (ID3->ID3EncapsulatedPictureType == JPEG_IMAGE || ID3->ID3EncapsulatedPictureType == PNG_IMAGE) { + if ((ID3->ID3EncapsulatedPictureType == JPEG_IMAGE || ID3->ID3EncapsulatedPictureType == PNG_IMAGE) && !metadata->hasCover) { ret = file.Open(path, SCE_O_RDONLY, 0); if (ret >= 0) { @@ -54,6 +54,8 @@ audio::Mp3Decoder::Mp3Decoder(const char *path, SceBool isSwDecoderUsed) : Shell file.Close(); coverLoader->size = ID3->ID3EncapsulatedPictureLength; coverLoader->Start(); + + metadata->hasCover = SCE_TRUE; } } } diff --git a/ElevenMPV-A/source/audio/opus.cpp b/ElevenMPV-A/source/audio/opus.cpp index 80a63dc..41142bc 100644 --- a/ElevenMPV-A/source/audio/opus.cpp +++ b/ElevenMPV-A/source/audio/opus.cpp @@ -60,7 +60,7 @@ audio::OpusDecoder::OpusDecoder(const char *path, SceBool isSwDecoderUsed) : Gen error = opus_picture_tag_parse(&picture_tag, metadata_block); if (error == 0) { - if (picture_tag.type == 3) { + if (picture_tag.type == 3 && !metadata->hasCover) { if (picture_tag.format == OP_PIC_FORMAT_JPEG || picture_tag.format == OP_PIC_FORMAT_PNG) { coverLoader = new audio::PlayerCoverLoaderThread(SCE_KERNEL_COMMON_QUEUE_HIGHEST_PRIORITY, SCE_KERNEL_4KiB, "EMPVA::PlayerCoverLoader"); diff --git a/ElevenMPV-A/source/main.cpp b/ElevenMPV-A/source/main.cpp index eacc1e7..a44412f 100644 --- a/ElevenMPV-A/source/main.cpp +++ b/ElevenMPV-A/source/main.cpp @@ -13,14 +13,6 @@ #include "menu_settings.h" #include "menu_audioplayer.h" -extern "C" { - - //extern const char sceUserMainThreadName[] = "paf_main_thr"; - //extern const int sceUserMainThreadPriority = SCE_KERNEL_DEFAULT_PRIORITY_USER; - //extern const unsigned int sceUserMainThreadStackSize = 6 * 1024 * 1024; - -} - using namespace paf; typedef struct SceSysmoduleOpt { @@ -50,7 +42,8 @@ widget::Widget *g_settings_page; widget::Widget *g_player_page; widget::Widget *g_settings_option; widget::Widget *g_top_text; -graphics::Texture *g_commonBgTex; +graphics::Texture *g_commonBgTex = SCE_NULL; +graphics::Texture *g_coverBgTex = SCE_NULL; widget::BusyIndicator *g_commonBusyInidcator; widget::Widget *g_commonOptionDialog; @@ -62,7 +55,7 @@ menu::displayfiles::Page *g_currentDispFilePage; menu::settings::SettingsButtonCB *g_settingsButtonCB; config::Config *g_config; -static SceBool s_memGrown = SCE_FALSE; +static SceInt32 s_memGrown = 0; void pafLoadPrx(SceUInt32 flags) { @@ -71,7 +64,9 @@ void pafLoadPrx(SceUInt32 flags) ScePafInit init_param; SceSysmoduleOpt sysmodule_opt; - if (flags) + if (flags == 2) + init_param.global_heap_size = 22 * 1024 * 1024; + else if (flags == 1) init_param.global_heap_size = 12 * 1024 * 1024; else init_param.global_heap_size = 5 * 1024 * 1024; @@ -110,8 +105,19 @@ SceVoid pluginLoadCB(Plugin *plugin) g_config->GetLastDirectory(&initCwd); g_commonBgTex = new graphics::Texture(); - searchParam.hash = EMPVAUtils::GetHash("tex_common_bg"); - Plugin::LoadTexture(g_commonBgTex, plugin, &searchParam); + + if (s_memGrown == 2) { + g_coverBgTex = new graphics::Texture(); + searchParam.hash = EMPVAUtils::GetHash("tex_common_bg_full"); + Plugin::LoadTexture(g_commonBgTex, plugin, &searchParam); + searchParam.hash = EMPVAUtils::GetHash("tex_common_bg"); + Plugin::LoadTexture(g_coverBgTex, g_empvaPlugin, &searchParam); + } + else { + searchParam.hash = EMPVAUtils::GetHash("tex_common_bg"); + Plugin::LoadTexture(g_commonBgTex, plugin, &searchParam); + g_coverBgTex = g_commonBgTex; + } searchParam.hash = EMPVAUtils::GetHash("page_common"); g_root_page = g_empvaPlugin->CreateScene(&searchParam, &rwiParam); @@ -191,9 +197,14 @@ int main() { #endif //Grow memory if possible - ret = sceAppMgrGrowMemory3(16 * 1024 * 1024, 1); - if (ret == 0) - s_memGrown = SCE_TRUE; + ret = sceAppMgrGrowMemory3(32 * 1024 * 1024, 1); // 48 MB + if (ret < 0) { + ret = sceAppMgrGrowMemory3(16 * 1024 * 1024, 1); // 32 MB + if (ret == 0) + s_memGrown = 1; + } + else + s_memGrown = 2; pafLoadPrx((SceUInt32)s_memGrown); @@ -202,7 +213,11 @@ int main() { fwParam.applicationMode = Framework::Mode_ApplicationA; //fwParam.optionalFeatureFlags = Framework::InitParam::FeatureFlag_DisableInternalCallbackChecks; - if (s_memGrown) { + if (s_memGrown == 2) { + fwParam.defaultSurfacePoolSize = 17 * 1024 * 1024 + 512 * 1024; + fwParam.textSurfaceCacheSize = 2 * 1024 * 1024; + } + else if (s_memGrown == 1) { fwParam.defaultSurfacePoolSize = 11 * 1024 * 1024 + 512 * 1024; fwParam.textSurfaceCacheSize = 2 * 1024 * 1024; } diff --git a/ElevenMPV-A/source/menus/menu_displayfiles.cpp b/ElevenMPV-A/source/menus/menu_displayfiles.cpp index c9cd546..b7e0a27 100644 --- a/ElevenMPV-A/source/menus/menu_displayfiles.cpp +++ b/ElevenMPV-A/source/menus/menu_displayfiles.cpp @@ -19,6 +19,7 @@ SceVoid menu::displayfiles::CoverLoaderThread::EntryFunction() Resource::Element searchParam; widget::Widget *playerCover; widget::Widget::Color col; + SceFVector4 wsize; Misc::OpenResult fres; graphics::Texture tex; SceInt32 res; @@ -73,8 +74,14 @@ SceVoid menu::displayfiles::CoverLoaderThread::EntryFunction() col.b = 0.286; col.a = 1; + wsize.x = 960.0; + wsize.y = 960.0; + wsize.z = 0.0f; + wsize.w = 0.0f; + if (g_currentDispFilePage == workPage && !g_isPlayerActive) { g_root->SetFilterColor(&col); + g_root->SetSize(&wsize); g_root->SetTextureBase(&tex); } @@ -343,13 +350,22 @@ menu::displayfiles::Page::~Page() SceVoid menu::displayfiles::Page::ResetBgPlaneTex() { widget::Widget::Color col; + SceFVector4 wsize; col.r = 1; col.g = 1; col.b = 1; col.a = 1; g_root->SetFilterColor(&col); + + wsize.x = 960.0; + wsize.y = 544.0; + wsize.z = 0.0f; + wsize.w = 0.0f; + g_root->SetSize(&wsize); + g_root->SetTextureBase(g_commonBgTex); + if (g_currentCoverSurf) delete g_currentCoverSurf; g_currentCoverSurf = SCE_NULL; diff --git a/Resource/empva_plugin.xml b/Resource/empva_plugin.xml index 4a2d28e..e5c4e87 100644 --- a/Resource/empva_plugin.xml +++ b/Resource/empva_plugin.xml @@ -461,7 +461,7 @@ - + @@ -532,7 +532,7 @@ - + @@ -548,7 +548,7 @@ - + @@ -558,6 +558,7 @@ +