mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 19:28:43 +12:00
Fix cache removal
This commit is contained in:
parent
fc92ae4085
commit
f902a7867c
1 changed files with 8 additions and 7 deletions
|
@ -647,6 +647,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
QAction* copy_name = info_menu->addAction(tr("&Copy Name"));
|
QAction* copy_name = info_menu->addAction(tr("&Copy Name"));
|
||||||
QAction* copy_serial = info_menu->addAction(tr("&Copy Serial"));
|
QAction* copy_serial = info_menu->addAction(tr("&Copy Serial"));
|
||||||
|
|
||||||
|
const std::string cache_base_dir = fs::get_cache_dir() + "cache/" + currGame.serial;
|
||||||
const std::string config_base_dir = fs::get_config_dir() + "data/" + currGame.serial;
|
const std::string config_base_dir = fs::get_config_dir() + "data/" + currGame.serial;
|
||||||
|
|
||||||
connect(boot, &QAction::triggered, [=]
|
connect(boot, &QAction::triggered, [=]
|
||||||
|
@ -694,9 +695,9 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
{
|
{
|
||||||
if (mb->checkBox()->isChecked())
|
if (mb->checkBox()->isChecked())
|
||||||
{
|
{
|
||||||
RemoveShadersCache(config_base_dir);
|
RemoveShadersCache(cache_base_dir);
|
||||||
RemovePPUCache(config_base_dir);
|
RemovePPUCache(cache_base_dir);
|
||||||
RemoveSPUCache(config_base_dir);
|
RemoveSPUCache(cache_base_dir);
|
||||||
RemoveCustomConfiguration(config_base_dir);
|
RemoveCustomConfiguration(config_base_dir);
|
||||||
}
|
}
|
||||||
fs::remove_all(currGame.path);
|
fs::remove_all(currGame.path);
|
||||||
|
@ -721,15 +722,15 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
});
|
});
|
||||||
connect(removeShadersCache, &QAction::triggered, [=]()
|
connect(removeShadersCache, &QAction::triggered, [=]()
|
||||||
{
|
{
|
||||||
RemoveShadersCache(config_base_dir, true);
|
RemoveShadersCache(cache_base_dir, true);
|
||||||
});
|
});
|
||||||
connect(removePPUCache, &QAction::triggered, [=]()
|
connect(removePPUCache, &QAction::triggered, [=]()
|
||||||
{
|
{
|
||||||
RemovePPUCache(config_base_dir, true);
|
RemovePPUCache(cache_base_dir, true);
|
||||||
});
|
});
|
||||||
connect(removeSPUCache, &QAction::triggered, [=]()
|
connect(removeSPUCache, &QAction::triggered, [=]()
|
||||||
{
|
{
|
||||||
RemoveSPUCache(config_base_dir, true);
|
RemoveSPUCache(cache_base_dir, true);
|
||||||
});
|
});
|
||||||
connect(openGameFolder, &QAction::triggered, [=]()
|
connect(openGameFolder, &QAction::triggered, [=]()
|
||||||
{
|
{
|
||||||
|
@ -834,7 +835,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
removeConfig->setEnabled(gameinfo->hasCustomConfig);
|
removeConfig->setEnabled(gameinfo->hasCustomConfig);
|
||||||
|
|
||||||
// remove options if necessary
|
// remove options if necessary
|
||||||
if (!fs::is_dir(config_base_dir))
|
if (!fs::is_dir(cache_base_dir))
|
||||||
{
|
{
|
||||||
removeShadersCache->setEnabled(false);
|
removeShadersCache->setEnabled(false);
|
||||||
removePPUCache->setEnabled(false);
|
removePPUCache->setEnabled(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue