Remove lib_loading_type::automatic

This is former default and is now obsolete.
This commit is contained in:
Nekotekina 2019-08-07 20:46:41 +03:00
parent 4f22559ff0
commit d45c743877
6 changed files with 8 additions and 155 deletions

View File

@ -45,9 +45,8 @@ void fmt_class_string<lib_loading_type>::format(std::string& out, u64 arg)
{
switch (value)
{
case lib_loading_type::automatic: return "Automatically load required libraries";
case lib_loading_type::manual: return "Manually load selected libraries";
case lib_loading_type::both: return "Load automatic and manual selection";
case lib_loading_type::hybrid: 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";
@ -1283,15 +1282,9 @@ 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::liblv2list)
else
{
// Load only liblv2.sprx
load_libs.emplace("liblv2.sprx");
}
if (g_cfg.core.lib_loading == lib_loading_type::automatic || g_cfg.core.lib_loading == lib_loading_type::both)
{
if (g_cfg.core.lib_loading == lib_loading_type::both && g_cfg.core.load_libraries.get_set().count("liblv2.sprx"))
if (g_cfg.core.lib_loading != lib_loading_type::hybrid || g_cfg.core.load_libraries.get_set().count("liblv2.sprx"))
{
// Will load libsysmodule.sprx internally
load_libs.emplace("liblv2.sprx");
@ -1302,129 +1295,6 @@ void ppu_load_exec(const ppu_exec_object& elf)
load_libs.emplace("libsysmodule.sprx");
}
}
else if (0)
{
// Load recommended set of modules: Module name -> SPRX
std::unordered_multimap<std::string, std::string> sprx_map
{
{ "cellAdec", "libadec.sprx" }, // cellSpurs|cell_libac3dec|cellAtrac3dec|cellAtracXdec|cellCelpDec|cellDTSdec|cellM2AACdec|cellM2BCdec|cellM4AacDec|cellMP3dec|cellTRHDdec|cellWMAdec|cellDTSLBRdec|cellDDPdec|cellM4AacDec2ch|cellDTSHDdec|cellMPL1dec|cellMP3Sdec|cellM4AacDec2chmod|cellCelp8Dec|cellWMAPROdec|cellWMALSLdec|cellDTSHDCOREdec|cellAtrac3multidec
{ "cellAdec", "libsre.sprx" },
{ "cellAdec", "libac3dec.sprx" },
{ "cellAdec", "libat3dec.sprx" },
{ "cellAdec", "libat3multidec.sprx" },
{ "cellAdec", "libatxdec.sprx" },
{ "cellAdec", "libcelp8dec.sprx" },
{ "cellAdec", "libcelpdec.sprx" },
{ "cellAdec", "libddpdec.sprx" },
{ "cellAdec", "libm2bcdec.sprx" },
{ "cellAdec", "libm4aacdec.sprx" },
{ "cellAdec", "libm4aacdec2ch.sprx" },
{ "cellAdec", "libmp3dec.sprx" },
{ "cellAdec", "libmpl1dec.sprx" },
{ "cellAdec", "libwmadec.sprx" },
{ "cellAtrac", "libatrac3plus.sprx" },
{ "cellAtrac", "cellAdec" },
{ "cellAtracMulti", "libatrac3multi.sprx" },
{ "cellAtracMulti", "cellAdec" },
{ "cellCelp8Enc", "libcelp8enc.sprx" },
{ "cellCelp8Enc", "libsre.sprx" },
{ "cellCelpEnc", "libcelpenc.sprx" },
{ "cellCelpEnc", "libsre.sprx" },
{ "cellDmux", "libdmux.sprx" },
{ "cellDmux", "libdmuxpamf.sprx" },
{ "cellDmux", "libsre.sprx" },
{ "cellFiber", "libfiber.sprx" },
{ "cellFont", "libfont.sprx" },
{ "cellFontFT", "libfontFT.sprx" },
{ "cellFontFT", "libfreetype.sprx" },
{ "cellGcmSys", "libgcm_sys.sprx" },
{ "cellGifDec", "libgifdec.sprx" },
{ "cellGifDec", "libsre.sprx" },
{ "cellJpgDec", "libjpgdec.sprx" },
{ "cellJpgDec", "libsre.sprx" },
{ "cellJpgEnc", "libjpgenc.sprx" },
{ "cellJpgEnc", "libsre.sprx" },
{ "cellKey2char", "libkey2char.sprx" },
{ "cellL10n", "libl10n.sprx" },
{ "cellM4hdEnc", "libm4hdenc.sprx" },
{ "cellM4hdEnc", "libsre.sprx" },
{ "cellPamf", "libpamf.sprx" },
{ "cellPngDec", "libpngdec.sprx" },
{ "cellPngDec", "libsre.sprx" },
{ "cellPngEnc", "libpngenc.sprx" },
{ "cellPngEnc", "libsre.sprx" },
{ "cellResc", "libresc.sprx" },
{ "cellRtc", "librtc.sprx" },
{ "cellSsl", "libssl.sprx" },
{ "cellSsl", "librtc.sprx" },
{ "cellHttp", "libhttp.sprx" },
{ "cellHttp", "cellSsl" },
{ "cellHttpUtil", "libhttp.sprx" },
{ "cellHttpUtil", "cellSsl" },
{ "cellSail", "libsail.sprx" },
{ "cellSail", "libsre.sprx" },
{ "cellSail", "libmp4.sprx" },
{ "cellSail", "libpamf.sprx" },
{ "cellSail", "libdmux.sprx" },
{ "cellSail", "libdmuxpamf.sprx" },
{ "cellSail", "libapostsrc_mini.sprx" },
{ "cellSail", "libsail_avi.sprx" },
{ "cellSail", "libvpost.sprx" },
{ "cellSail", "cellAdec" },
{ "cellSpursJq", "libspurs_jq.sprx" },
{ "cellSpursJq", "libsre.sprx" },
{ "cellSync", "libsre.sprx" },
{ "cellSheap", "libsre.sprx" },
{ "cellOvis", "libsre.sprx" },
{ "cellSpurs", "libsre.sprx" },
{ "cellDaisy", "libsre.sprx" },
{ "cellSpudll", "libsre.sprx" },
{ "cellSync2", "libsync2.sprx" },
{ "cellSync2", "libsre.sprx" },
{ "cellVpost", "libvpost.sprx" },
{ "cellVpost", "libsre.sprx" },
{ "sys_fs", "libfs.sprx" },
};
// Expand dependencies
for (bool repeat = true; repeat;)
{
repeat = false;
for (auto it = sprx_map.begin(), end = sprx_map.end(); it != end; ++it)
{
auto range = sprx_map.equal_range(it->second);
if (range.first != range.second)
{
decltype(sprx_map) add;
for (; range.first != range.second; ++range.first)
{
add.emplace(it->first, range.first->second);
}
sprx_map.erase(it);
sprx_map.insert(add.begin(), add.end());
repeat = true;
break;
}
}
}
for (const auto& pair : link->modules)
{
if (!pair.second.imported)
{
continue;
}
for (auto range = sprx_map.equal_range(pair.first); range.first != range.second; ++range.first)
{
load_libs.emplace(range.first->second);
}
}
}
// Program entry
u32 entry = 0;

View File

@ -131,7 +131,7 @@ static error_code prx_load_module(const std::string& vpath, u64 flags, vm::ptr<s
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::hybrid || g_cfg.core.lib_loading == lib_loading_type::liblv2both))
{
// Ignore ignore list if the library is selected in 'both' mode
if (g_cfg.core.load_libraries.get_set().count(name) != 0)

View File

@ -42,9 +42,8 @@ enum class spu_block_size_type
enum class lib_loading_type
{
automatic,
manual,
both,
hybrid,
liblv2only,
liblv2both,
liblv2list,

View File

@ -25,9 +25,8 @@
"LLVM": "This is the fastest option with very good compatibility.\nRecompiles the game's SPU LLVM cache before running which adds extra start-up time.\nIf you experience issues, use the ASMJIT Recompiler."
},
"libraries": {
"auto": "Automatically selects the LLE libraries to load.\nWhile this option works fine in most cases, liblv2 is the preferred option.",
"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": "Load libsysmodule.sprx and chosen list of libraries. Option for backward compatibility.\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."

View File

@ -305,7 +305,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
#endif
// lib options tool tips
SubscribeTooltip(ui->lib_auto, json_cpu_lib["auto"].toString());
SubscribeTooltip(ui->lib_manu, json_cpu_lib["manual"].toString());
SubscribeTooltip(ui->lib_both, json_cpu_lib["both"].toString());
SubscribeTooltip(ui->lib_lv2, json_cpu_lib["liblv2"].toString());
@ -314,9 +313,8 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
// creating this in ui file keeps scrambling the order...
QButtonGroup *libModeBG = new QButtonGroup(this);
libModeBG->addButton(ui->lib_auto, (int)lib_loading_type::automatic);
libModeBG->addButton(ui->lib_manu, (int)lib_loading_type::manual);
libModeBG->addButton(ui->lib_both, (int)lib_loading_type::both);
libModeBG->addButton(ui->lib_both, (int)lib_loading_type::hybrid);
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);
@ -391,7 +389,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> 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 || ind == (int)lib_loading_type::liblv2list)
if (ind != (int)lib_loading_type::liblv2only)
{
ui->searchBox->setEnabled(true);
ui->lleList->setEnabled(true);

View File

@ -148,19 +148,6 @@
<string>Firmware Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="lib_auto">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatically load required libraries</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="lib_manu">
<property name="sizePolicy">