From 4c9296c07f34896ae361302d71b4640466aa53a0 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi <18193363+elad335@users.noreply.github.com> Date: Mon, 10 Jun 2024 11:41:35 +0300 Subject: [PATCH] Game List: Add shortcut to open cache dir Enabled whenever debug tab is in order to protect important caches such as PPU from accidental deletion. --- rpcs3/rpcs3qt/game_list_frame.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index e47fdbe0b1..9ec2752eb2 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -1250,6 +1250,22 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) gui::utils::open_dir(config_path); }); } + + // This is a debug feature, let's hide it by reusing debug tab protection + if (m_gui_settings->GetValue(gui::m_showDebugTab).toBool()) + { + QAction* open_cache_folder = menu.addAction(tr("&Open Cache Folder")); + open_cache_folder->setEnabled(fs::is_dir(cache_base_dir)); + + if (open_cache_folder->isEnabled()) + { + connect(open_cache_folder, &QAction::triggered, this, [cache_base_dir]() + { + gui::utils::open_dir(cache_base_dir); + }); + } + } + if (fs::is_dir(data_base_dir)) { QAction* open_data_dir = menu.addAction(tr("&Open Data Folder"));