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

Commit

Permalink
Simplify exit process, fix playback issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GrapheneCt committed Jul 15, 2021
1 parent b69111c commit 8edaf07
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
Binary file removed ElevenMPV-A/CONTENTS/module/exit_module.suprx
Binary file not shown.
2 changes: 2 additions & 0 deletions ElevenMPV-A/include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ extern "C" {
int sceAppMgrAcquireBgmPortWithPriority(SceUInt32 priority);

int sceShellUtilExitToLiveBoard();

SceUID _vshKernelSearchModuleByName(const char *name, SceUInt64 *unk);
}

static const SceUInt32 k_supportedExtNum = 15;
Expand Down
4 changes: 2 additions & 2 deletions ElevenMPV-A/source/menus/menu_audioplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ SceVoid menu::audioplayer::Audioplayer::RegularTask(ScePVoid pUserData)
config::Config::EMPVAConfig *config = g_config->GetConfigLocation();

// Set progressbar value
currentPos = currentDecoder->GetPosition();
if (!sceKernelPollEventFlag(g_eventFlagUid, FLAG_ELEVENMPVA_IS_FG, SCE_KERNEL_EVF_WAITMODE_AND, SCE_NULL)) {
searchParam.hash = EMPVAUtils::GetHash("progressbar_player");
widget::ProgressBarTouch *playerProgBar = (widget::ProgressBarTouch *)g_player_page->GetChildByHash(&searchParam, 0);

currentPos = currentDecoder->GetPosition();
length = currentDecoder->GetLength();
currentPosSec = (SceUInt64)((SceFloat32)currentPos / (SceFloat32)currentDecoder->GetSampleRate());

Expand Down Expand Up @@ -253,7 +253,7 @@ SceVoid menu::audioplayer::Audioplayer::RegularTask(ScePVoid pUserData)
HandleNext(SCE_FALSE, SCE_FALSE);
return;
}
int ret = 0;

// Check Shell IPC
if (!EMPVAUtils::IsSleep()) {
ipcCom = EMPVAUtils::IPC::PeekTx();
Expand Down
8 changes: 2 additions & 6 deletions ElevenMPV-A/source/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ SceVoid EMPVAUtils::AppWatchdogTask(ScePVoid pUserData)
sceMusicPlayerServiceSendEvent(SCE_MUSICCORE_EVENTID_STOP, 0);
sceMusicPlayerServiceTerminate();
}

EMPVAUtils::Exit();

break;
Expand Down Expand Up @@ -253,15 +253,11 @@ SceVoid EMPVAUtils::Init()
SceVoid EMPVAUtils::Exit()
{
SceInt32 ret;
char pluginPath[256];

if (s_shellPluginUID > 0)
taiStopUnloadModuleForPid(s_shellPid, s_shellPluginUID, 0, SCE_NULL, 0, SCE_NULL, &ret);

sce_paf_snprintf(pluginPath, 256, "%s%s%s", "ux0:app/", s_titleid, "/module/exit_module.suprx");
SceUID modid = taiLoadStartKernelModule(pluginPath, 0, SCE_NULL, 0);
sceAppMgrQuitForNonSuspendableApp();
taiStopUnloadKernelModule(modid, 0, SCE_NULL, 0, SCE_NULL, SCE_NULL);
sceKernelExitProcess(0);
}

SceVoid EMPVAUtils::Activate()
Expand Down

0 comments on commit 8edaf07

Please sign in to comment.