mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
Qt: Present game removal failure to the user
All the required information was already there, but UI always reported success
This commit is contained in:
parent
e4ba096190
commit
331c1a394a
1 changed files with 18 additions and 10 deletions
|
@ -1065,18 +1065,26 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
mb->deleteLater();
|
mb->deleteLater();
|
||||||
if (mb->exec() == QMessageBox::Yes)
|
if (mb->exec() == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
if (mb->checkBox()->isChecked())
|
const bool remove_caches = mb->checkBox()->isChecked();
|
||||||
|
if (fs::remove_all(currGame.path))
|
||||||
{
|
{
|
||||||
RemoveShadersCache(cache_base_dir);
|
if (remove_caches)
|
||||||
RemovePPUCache(cache_base_dir);
|
{
|
||||||
RemoveSPUCache(cache_base_dir);
|
RemoveShadersCache(cache_base_dir);
|
||||||
RemoveCustomConfiguration(currGame.serial);
|
RemovePPUCache(cache_base_dir);
|
||||||
RemoveCustomPadConfiguration(currGame.serial);
|
RemoveSPUCache(cache_base_dir);
|
||||||
|
RemoveCustomConfiguration(currGame.serial);
|
||||||
|
RemoveCustomPadConfiguration(currGame.serial);
|
||||||
|
}
|
||||||
|
m_game_data.erase(std::remove(m_game_data.begin(), m_game_data.end(), gameinfo), m_game_data.end());
|
||||||
|
LOG_SUCCESS(GENERAL, "Removed %s %s in %s", currGame.category, currGame.name, currGame.path);
|
||||||
|
Refresh(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR(GENERAL, "Failed to remove %s %s in %s (%s)", currGame.category, currGame.name, currGame.path, fs::g_tls_error);
|
||||||
|
QMessageBox::critical(this, tr("Failure!"), tr(remove_caches ? "Failed to remove %0 from drive!\nPath: %1\nCaches and custom configs have been left intact." : "Failed to remove %0 from drive!\nPath: %1").arg(name).arg(qstr(currGame.path)));
|
||||||
}
|
}
|
||||||
fs::remove_all(currGame.path);
|
|
||||||
m_game_data.erase(std::remove(m_game_data.begin(), m_game_data.end(), gameinfo), m_game_data.end());
|
|
||||||
LOG_SUCCESS(GENERAL, "Removed %s %s in %s", currGame.category, currGame.name, currGame.path);
|
|
||||||
Refresh(true);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(openGameFolder, &QAction::triggered, [=]()
|
connect(openGameFolder, &QAction::triggered, [=]()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue