From cf16ee5eb5966dfe52d3e7246341b453fe10092c Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 6 Aug 2019 21:52:12 +0300 Subject: [PATCH] Implement lib_loading_type::liblv2list --- rpcs3/Emu/Cell/PPUModule.cpp | 3 ++- rpcs3/Emu/Cell/lv2/sys_prx.cpp | 14 +++++++++++++- rpcs3/Emu/System.h | 1 + rpcs3/Json/tooltips.json | 1 + rpcs3/rpcs3qt/settings_dialog.cpp | 4 +++- rpcs3/rpcs3qt/settings_dialog.ui | 13 +++++++++++++ 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index 7e885d9de9..0e2319bbaa 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -50,6 +50,7 @@ void fmt_class_string::format(std::string& out, u64 arg) 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::liblv2both: return "Load liblv2.sprx and manual selection"; + case lib_loading_type::liblv2list: return "Load liblv2.sprx and strict selection"; } 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_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_libs.emplace("liblv2.sprx"); diff --git a/rpcs3/Emu/Cell/lv2/sys_prx.cpp b/rpcs3/Emu/Cell/lv2/sys_prx.cpp index fdec09bdf5..c643d32266 100644 --- a/rpcs3/Emu/Cell/lv2/sys_prx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_prx.cpp @@ -117,7 +117,19 @@ static error_code prx_load_module(const std::string& vpath, u64 flags, vm::ptr guiSettings, std: SubscribeTooltip(ui->lib_both, json_cpu_lib["both"].toString()); SubscribeTooltip(ui->lib_lv2, json_cpu_lib["liblv2"].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... QButtonGroup *libModeBG = new QButtonGroup(this); @@ -318,6 +319,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: libModeBG->addButton(ui->lib_both, (int)lib_loading_type::both); libModeBG->addButton(ui->lib_lv2, (int)lib_loading_type::liblv2only); libModeBG->addButton(ui->lib_lv2b, (int)lib_loading_type::liblv2both); + libModeBG->addButton(ui->lib_lv2l, (int)lib_loading_type::liblv2list); {// Handle lib loading options QString selectedLib = qstr(xemu_settings->GetSetting(emu_settings::LibLoadOptions)); @@ -389,7 +391,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: 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->lleList->setEnabled(true); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index d007f9a835..2ad0e0f522 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -213,6 +213,19 @@ + + + + + 0 + 0 + + + + Load liblv2.sprx and strict selection + + +