mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
Make optional VSH on File ➔ All Titles ➔ Create LLVM Caches dialog (#19270)
Make optional VSH CPU compilation on `File ➔ All Titles ➔ Create LLVM Caches` dialog. By default it is now excluded due to VSH caches are fully covered by the dedicated submenu `File ➔ Firmware`.
This commit is contained in:
@@ -1235,23 +1235,46 @@ void game_list_actions::BatchActionBySerials(progress_dialog* pdlg, const std::s
|
||||
|
||||
void game_list_actions::BatchCreateCPUCaches(const std::vector<game_info>& games, bool is_fast_compilation, bool is_interactive)
|
||||
{
|
||||
if (is_interactive && QMessageBox::question(m_game_list_frame, tr("Confirm Creation"), tr("Create LLVM cache?")) != QMessageBox::Yes)
|
||||
// The VSH cache is only part of this batch if no specific games were selected
|
||||
const bool vsh_selectable = games.empty();
|
||||
|
||||
// Without a dialog to ask the user, a batch of all titles includes the VSH cache
|
||||
bool include_vsh = vsh_selectable;
|
||||
|
||||
if (is_interactive)
|
||||
{
|
||||
return;
|
||||
QMessageBox mb(QMessageBox::Question, tr("Confirm Creation"), tr("Create LLVM cache?"), QMessageBox::Yes | QMessageBox::No, m_game_list_frame);
|
||||
|
||||
if (vsh_selectable)
|
||||
{
|
||||
mb.setCheckBox(new QCheckBox(tr("Include PS3 Interface (XMB, or VSH)")));
|
||||
}
|
||||
|
||||
if (mb.exec() != QMessageBox::Yes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
include_vsh = mb.checkBox() && mb.checkBox()->isChecked();
|
||||
}
|
||||
|
||||
std::set<std::string> serials;
|
||||
|
||||
if (games.empty())
|
||||
{
|
||||
serials.emplace("vsh.self");
|
||||
}
|
||||
|
||||
for (const auto& game : (games.empty() ? m_game_list_frame->GetGameInfo() : games))
|
||||
{
|
||||
serials.emplace(game->info.serial);
|
||||
}
|
||||
|
||||
if (include_vsh)
|
||||
{
|
||||
serials.emplace("vsh.self");
|
||||
}
|
||||
else if (vsh_selectable)
|
||||
{
|
||||
// The VSH entry is part of the full game list, so it has to be removed if unwanted
|
||||
serials.erase("vsh.self");
|
||||
}
|
||||
|
||||
const usz total = serials.size();
|
||||
|
||||
if (total == 0)
|
||||
|
||||
Reference in New Issue
Block a user