From 5f9dba40a0fe71ccd7014ae37a2fbfd8f225396e Mon Sep 17 00:00:00 2001 From: crueter Date: Wed, 15 Oct 2025 04:54:41 +0200 Subject: [desktop] Data Manager, data import/export (#2700) This adds a "Data Manager" dialog to the Tools menu. The Data Manager allows for the following operations: - Open w/ system file manager - Clear - Export - Import On any of the following directories: - Save (w/ profile selector) - UserNAND - SysNAND - Mods - Shaders TODO for the future: - "Cleanup" for each directory - TitleID -> Game name--let users clean data for a specific game if applicable Signed-off-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2700 Reviewed-by: MaranBr Reviewed-by: Lizzie --- src/yuzu/main.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 2c991b9208..77bfe5db9f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -156,6 +156,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "yuzu/debugger/console.h" #include "yuzu/debugger/controller.h" #include "yuzu/debugger/wait_tree.h" +#include "yuzu/data_dialog.h" #include "yuzu/deps_dialog.h" #include "yuzu/discord.h" #include "yuzu/game_list.h" @@ -1705,6 +1706,7 @@ void GMainWindow::ConnectMenuEvents() { connect_menu(ui->action_Install_Keys, &GMainWindow::OnInstallDecryptionKeys); connect_menu(ui->action_About, &GMainWindow::OnAbout); connect_menu(ui->action_Eden_Dependencies, &GMainWindow::OnEdenDependencies); + connect_menu(ui->action_Data_Manager, &GMainWindow::OnDataDialog); } void GMainWindow::UpdateMenuState() { @@ -2406,7 +2408,6 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target ASSERT_MSG(has_user_save != has_device_save, "Game uses both user and device savedata?"); - // TODO(alekpop): It returns the wrong user switch (target) { case GameListOpenTarget::SaveData: { open_target = tr("Save Data"); @@ -2792,6 +2793,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } void GMainWindow::OnGameListOpenDirectory(const QString& directory) { + // TODO(crueter): QtCommon std::filesystem::path fs_path; if (directory == QStringLiteral("SDMC")) { fs_path = @@ -3934,6 +3936,15 @@ void GMainWindow::OnEdenDependencies() { depsDialog.exec(); } +void GMainWindow::OnDataDialog() { + DataDialog dataDialog(this); + dataDialog.exec(); + + // refresh stuff in case it was cleared + OnGameListRefresh(); + +} + void GMainWindow::OnToggleFilterBar() { game_list->SetFilterVisible(ui->action_Show_Filter_Bar->isChecked()); if (ui->action_Show_Filter_Bar->isChecked()) { @@ -4474,11 +4485,15 @@ void GMainWindow::SetFirmwareVersion() { if (result.IsError() || !CheckFirmwarePresence()) { LOG_INFO(Frontend, "Installed firmware: No firmware available"); + ui->menu_Applets->setEnabled(false); + ui->menu_Create_Shortcuts->setEnabled(false); firmware_label->setVisible(false); return; } firmware_label->setVisible(true); + ui->menu_Applets->setEnabled(true); + ui->menu_Create_Shortcuts->setEnabled(true); const std::string display_version(firmware_data.display_version.data()); const std::string display_title(firmware_data.display_title.data()); -- cgit v1.2.3