1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

Implement lib_loading_type::liblv2list

This commit is contained in:
Nekotekina 2019-08-06 21:52:12 +03:00
parent ae46333e99
commit cf16ee5eb5
6 changed files with 33 additions and 3 deletions

View File

@ -50,6 +50,7 @@ void fmt_class_string<lib_loading_type>::format(std::string& out, u64 arg)
case lib_loading_type::both: return "Load automatic and manual selection"; case lib_loading_type::both: return "Load automatic and manual selection";
case lib_loading_type::liblv2only: return "Load liblv2.sprx only"; case lib_loading_type::liblv2only: return "Load liblv2.sprx only";
case lib_loading_type::liblv2both: return "Load liblv2.sprx and manual selection"; case lib_loading_type::liblv2both: return "Load liblv2.sprx and manual selection";
case lib_loading_type::liblv2list: return "Load liblv2.sprx and strict selection";
} }
return unknown; return unknown;
@ -1282,7 +1283,7 @@ void ppu_load_exec(const ppu_exec_object& elf)
// Load required set of modules (lib_loading_type::both processed in sys_prx.cpp) // Load required set of modules (lib_loading_type::both processed in sys_prx.cpp)
load_libs = g_cfg.core.load_libraries.get_set(); load_libs = g_cfg.core.load_libraries.get_set();
} }
else if (g_cfg.core.lib_loading == lib_loading_type::liblv2only || g_cfg.core.lib_loading == lib_loading_type::liblv2both) else if (g_cfg.core.lib_loading >= lib_loading_type::liblv2only && g_cfg.core.lib_loading <= lib_loading_type::liblv2list)
{ {
// Load only liblv2.sprx // Load only liblv2.sprx
load_libs.emplace("liblv2.sprx"); load_libs.emplace("liblv2.sprx");

View File

@ -117,7 +117,19 @@ static error_code prx_load_module(const std::string& vpath, u64 flags, vm::ptr<s
return CELL_PRX_ERROR_LIBRARY_FOUND; return CELL_PRX_ERROR_LIBRARY_FOUND;
} }
bool ignore = s_prx_ignore.count(vpath) != 0; bool ignore = false;
if (g_cfg.core.lib_loading == lib_loading_type::liblv2list)
{
if (vpath.compare(0, 24, "/dev_flash/sys/external/") == 0 && vpath != "/dev_flash/sys/external/libsysmodule.sprx"sv)
{
ignore = g_cfg.core.load_libraries.get_set().count(name) == 0;
}
}
else
{
ignore = s_prx_ignore.count(vpath) != 0;
}
if (ignore && (g_cfg.core.lib_loading == lib_loading_type::both || g_cfg.core.lib_loading == lib_loading_type::liblv2both)) if (ignore && (g_cfg.core.lib_loading == lib_loading_type::both || g_cfg.core.lib_loading == lib_loading_type::liblv2both))
{ {

View File

@ -47,6 +47,7 @@ enum class lib_loading_type
both, both,
liblv2only, liblv2only,
liblv2both, liblv2both,
liblv2list,
}; };
enum sleep_timers_accuracy_level : u32 enum sleep_timers_accuracy_level : u32

View File

@ -29,6 +29,7 @@
"manual": "Allows the user to manually choose the LLE libraries to load.\nIf unsure, don't use this option. Nothing will work if you use this.", "manual": "Allows the user to manually choose the LLE libraries to load.\nIf unsure, don't use this option. Nothing will work if you use this.",
"both": "Automatically selects the LLE libraries to load and allows the user to choose additional libraries manually.\nIf unsure, don't use this option.", "both": "Automatically selects the LLE libraries to load and allows the user to choose additional libraries manually.\nIf unsure, don't use this option.",
"liblv2both": "Loads liblv2.sprx and chosen list of libraries.\nIf unsure, don't use this option.", "liblv2both": "Loads liblv2.sprx and chosen list of libraries.\nIf unsure, don't use this option.",
"liblv2list": "Loads liblv2.sprx and nothing but selected libraries.\nDon't use this option.",
"liblv2": "This closely emulates how games can load and unload system module files on a real PlayStation 3.\nSome games require this.\nThis is the preferred option." "liblv2": "This closely emulates how games can load and unload system module files on a real PlayStation 3.\nSome games require this.\nThis is the preferred option."
}, },
"checkboxes": { "checkboxes": {

View File

@ -310,6 +310,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
SubscribeTooltip(ui->lib_both, json_cpu_lib["both"].toString()); SubscribeTooltip(ui->lib_both, json_cpu_lib["both"].toString());
SubscribeTooltip(ui->lib_lv2, json_cpu_lib["liblv2"].toString()); SubscribeTooltip(ui->lib_lv2, json_cpu_lib["liblv2"].toString());
SubscribeTooltip(ui->lib_lv2b, json_cpu_lib["liblv2both"].toString()); SubscribeTooltip(ui->lib_lv2b, json_cpu_lib["liblv2both"].toString());
SubscribeTooltip(ui->lib_lv2l, json_cpu_lib["liblv2list"].toString());
// creating this in ui file keeps scrambling the order... // creating this in ui file keeps scrambling the order...
QButtonGroup *libModeBG = new QButtonGroup(this); QButtonGroup *libModeBG = new QButtonGroup(this);
@ -318,6 +319,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
libModeBG->addButton(ui->lib_both, (int)lib_loading_type::both); libModeBG->addButton(ui->lib_both, (int)lib_loading_type::both);
libModeBG->addButton(ui->lib_lv2, (int)lib_loading_type::liblv2only); libModeBG->addButton(ui->lib_lv2, (int)lib_loading_type::liblv2only);
libModeBG->addButton(ui->lib_lv2b, (int)lib_loading_type::liblv2both); libModeBG->addButton(ui->lib_lv2b, (int)lib_loading_type::liblv2both);
libModeBG->addButton(ui->lib_lv2l, (int)lib_loading_type::liblv2list);
{// Handle lib loading options {// Handle lib loading options
QString selectedLib = qstr(xemu_settings->GetSetting(emu_settings::LibLoadOptions)); QString selectedLib = qstr(xemu_settings->GetSetting(emu_settings::LibLoadOptions));
@ -389,7 +391,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
auto l_OnLibButtonClicked = [=](int ind) auto l_OnLibButtonClicked = [=](int ind)
{ {
if (ind == (int)lib_loading_type::manual || ind == (int)lib_loading_type::both || ind == (int)lib_loading_type::liblv2both) if (ind == (int)lib_loading_type::manual || ind == (int)lib_loading_type::both || ind == (int)lib_loading_type::liblv2both || ind == (int)lib_loading_type::liblv2list)
{ {
ui->searchBox->setEnabled(true); ui->searchBox->setEnabled(true);
ui->lleList->setEnabled(true); ui->lleList->setEnabled(true);

View File

@ -213,6 +213,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QRadioButton" name="lib_lv2l">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Load liblv2.sprx and strict selection</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>