mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
Lib Loader Radiobutton (#2689)
This commit is contained in:
parent
8060cf9b19
commit
ff5295de32
5 changed files with 60 additions and 23 deletions
|
@ -120,9 +120,23 @@ LOG_CHANNEL(sysPrxForUser);
|
|||
LOG_CHANNEL(gdbDebugServer);
|
||||
#endif
|
||||
|
||||
enum class lib_loader_mode
|
||||
{
|
||||
automatic,
|
||||
manual,
|
||||
both,
|
||||
liblv2only
|
||||
};
|
||||
|
||||
cfg::map_entry<lib_loader_mode> g_cfg_lib_loader(cfg::root.core, "Lib Loader", 1,
|
||||
{
|
||||
{ "Automatically load required libraries", lib_loader_mode::automatic },
|
||||
{ "Manually load required libraries", lib_loader_mode::manual },
|
||||
{ "Load automatic and manual selection", lib_loader_mode::both },
|
||||
{ "Load liblv2.sprx only", lib_loader_mode::liblv2only },
|
||||
});
|
||||
|
||||
cfg::bool_entry g_cfg_hook_ppu_funcs(cfg::root.core, "Hook static functions");
|
||||
cfg::bool_entry g_cfg_load_liblv2(cfg::root.core, "Load liblv2.sprx only");
|
||||
cfg::bool_entry g_cfg_load_libreq(cfg::root.core, "Load required libraries", true);
|
||||
|
||||
cfg::set_entry g_cfg_load_libs(cfg::root.core, "Load libraries");
|
||||
|
||||
|
@ -1094,18 +1108,17 @@ void ppu_load_exec(const ppu_exec_object& elf)
|
|||
// Get LLE module list
|
||||
std::set<std::string> load_libs;
|
||||
|
||||
if (!!g_cfg_load_liblv2 == !!g_cfg_load_libreq)
|
||||
if (g_cfg_lib_loader.get() == lib_loader_mode::manual || g_cfg_lib_loader.get() == lib_loader_mode::both)
|
||||
{
|
||||
// Load required set of modules
|
||||
load_libs = g_cfg_load_libs.get_set();
|
||||
}
|
||||
|
||||
if (g_cfg_load_liblv2 && !g_cfg_load_libreq)
|
||||
else if (g_cfg_lib_loader.get() == lib_loader_mode::liblv2only)
|
||||
{
|
||||
// Load only liblv2.sprx
|
||||
load_libs.emplace("liblv2.sprx");
|
||||
}
|
||||
else if (g_cfg_load_libreq)
|
||||
if (g_cfg_lib_loader.get() == lib_loader_mode::automatic || g_cfg_lib_loader.get() == lib_loader_mode::both)
|
||||
{
|
||||
// Load recommended set of modules: Module name -> SPRX
|
||||
std::unordered_multimap<std::string, std::string> sprx_map
|
||||
|
@ -1308,7 +1321,7 @@ void ppu_load_exec(const ppu_exec_object& elf)
|
|||
// TODO: adjust for liblv2 loading option
|
||||
u32 entry = static_cast<u32>(elf.header.e_entry);
|
||||
|
||||
if (!g_cfg_load_liblv2 || g_cfg_load_libreq)
|
||||
if (g_cfg_lib_loader.get() != lib_loader_mode::liblv2only)
|
||||
{
|
||||
// Set TLS args, call sys_initialize_tls
|
||||
ppu->cmd_list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue