Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Updated to v5.05
Browse files Browse the repository at this point in the history
  • Loading branch information
GrapheneCt committed Jul 19, 2021
1 parent a870470 commit d9e3d99
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 26 deletions.
Binary file modified ElevenMPV-A/CONTENTS/empva_plugin.rco
Binary file not shown.
Binary file modified ElevenMPV-A/CONTENTS/sce_sys/icon0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/bg0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ElevenMPV-A/CONTENTS/sce_sys/livearea/contents/startup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ElevenMPV-A/CONTENTS/sce_sys/pic0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ElevenMPV-A/include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion ElevenMPV-A/param.sfx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<paramsfo>
<param key="APP_VER">05.04</param>
<param key="APP_VER">05.05</param>
<param key="ATTRIBUTE">17338504</param>
<param key="ATTRIBUTE_MINOR">17</param>
<param key="ATTRIBUTE2">0</param>
Expand Down
4 changes: 3 additions & 1 deletion ElevenMPV-A/source/audio/at3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -181,6 +181,8 @@ SceVoid audio::At3Decoder::InitOMA(const char *path)
file.Close();
coverLoader->size = ID3->ID3EncapsulatedPictureLength;
coverLoader->Start();

metadata->hasCover = SCE_TRUE;
}
}
}
Expand Down
17 changes: 16 additions & 1 deletion ElevenMPV-A/source/audio/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ElevenMPV-A/source/audio/flac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down
4 changes: 3 additions & 1 deletion ElevenMPV-A/source/audio/mp3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ElevenMPV-A/source/audio/opus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
49 changes: 32 additions & 17 deletions ElevenMPV-A/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;

Expand All @@ -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)
{
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand All @@ -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;
}
Expand Down
16 changes: 16 additions & 0 deletions ElevenMPV-A/source/menus/menu_displayfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions Resource/empva_plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
<textobj font_size="20" color="1, 1, 1, 1" text_align="5" ellipsis="1" id="player_style_title_text_obj" />
</style_text>

<style_plane color="0.207, 0.247, 0.286, 1" id="plane_bg_style" />
<style_plane color="0, 0.007, 0.282, 1" id="plane_bg_style" />
</styletable>
<templatetable>

Expand Down Expand Up @@ -532,7 +532,7 @@
<locale origsize="3296" src="empva_files\locale\empva_locale_en.rcs.zlib" compress="on" id="it" />
<locale origsize="3296" src="empva_files\locale\empva_locale_en.rcs.zlib" compress="on" id="nl" />
<locale origsize="3296" src="empva_files\locale\empva_locale_en.rcs.zlib" compress="on" id="pt" />
<locale origsize="3296" src="empva_files\locale\empva_locale_en.rcs.zlib" compress="on" id="pt-br" />
<locale origsize="3616" src="empva_files\locale\empva_locale_pt-br.rcs.zlib" compress="on" id="pt-br" />
<locale origsize="3456" src="empva_files\locale\empva_locale_ru.rcs.zlib" compress="on" id="ru" />
<locale origsize="3296" src="empva_files\locale\empva_locale_en.rcs.zlib" compress="on" id="ko" />
<locale origsize="2784" src="empva_files\locale\empva_locale_zh-t.rcs.zlib" compress="on" id="zh-t" />
Expand All @@ -548,7 +548,7 @@
<texturetable>
<texture origsize="25728" src="empva_files\texture\tex_icon_music.zlib" type="texture/gim" id="tex_icon_music" compress="on" />
<texture origsize="6832" src="empva_files\texture\tex_icon_dir.zlib" type="texture/gim" id="tex_icon_dir" compress="on" />
<texture origsize="6832" src="empva_files\texture\tex_icon_unk.zlib" type="texture/gim" id="tex_icon_unk" compress="on" />
<texture origsize="6832" src="empva_files\texture\tex_icon_unk.zlib" ignore_make_surface_first="on" type="texture/gim" id="tex_icon_unk" compress="on" />
<texture origsize="10960" src="empva_files\texture\tex_button_pause.zlib" type="texture/gim" id="tex_button_pause" compress="on" />
<texture origsize="10960" src="empva_files\texture\tex_button_play.zlib" type="texture/gim" id="tex_button_play" compress="on" />
<texture origsize="10960" src="empva_files\texture\tex_button_rew.zlib" type="texture/gim" id="tex_button_rew" compress="on" />
Expand All @@ -558,6 +558,7 @@
<texture origsize="5328" src="empva_files\texture\tex_button_repeat_glow.zlib" type="texture/gim" id="tex_button_repeat_glow" compress="on" />
<texture origsize="5328" src="empva_files\texture\tex_button_repeat_glow_one.zlib" type="texture/gim" id="tex_button_repeat_glow_one" compress="on" />
<texture origsize="5328" src="empva_files\texture\tex_button_repeat.zlib" type="texture/gim" id="tex_button_repeat" compress="on" />
<texture src="empva_files\texture\tex_common_bg_full.png" ignore_make_surface_first="on" type="texture/png" id="tex_common_bg_full" />
<texture src="empva_files\texture\tex_common_bg.png" type="texture/png" id="tex_common_bg" />
</texturetable>

Expand Down

0 comments on commit d9e3d99

Please sign in to comment.