Implement get_cellos_appname()

Identifying vsh.self and possibly other operating system executables in the future.
This commit is contained in:
Eladash 2021-04-02 20:39:47 +03:00 committed by Ivan
parent 73320d4180
commit 878da3b474
3 changed files with 29 additions and 2 deletions

View file

@ -45,6 +45,17 @@ bool ps3_process_info_t::has_debug_perm() const
return (ctrl_flags1 & (0xa << 28)) != 0;
}
// If a SELF file is of CellOS return its filename, otheriwse return an empty string
std::string_view ps3_process_info_t::get_cellos_appname() const
{
if (!has_root_perm() || !Emu.GetTitleID().empty())
{
return {};
}
return std::string_view(Emu.GetBoot()).substr(Emu.GetBoot().find_last_of('/') + 1);
}
LOG_CHANNEL(sys_process);
ps3_process_info_t g_ps3_process_info;