diff options
| author | JosJuice <josjuice@gmail.com> | 2019-04-11 16:39:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-11 16:39:49 +0200 |
| commit | d5ed3cbd88b9cd473b4de5fbbf576ab18db2ab37 (patch) | |
| tree | 3ccba3b1e0c4e4e285ec6069f83c0efebb6ee253 /Source/Core/DolphinQt/Config/PropertiesDialog.cpp | |
| parent | 372b8552ce7c94c026e2309c0b9089440bdae672 (diff) | |
| parent | 8709b21ac30f5da5c32ef056b6562a37345b5f82 (diff) | |
Merge pull request #7922 from JosJuice/verify-disc
Add a Verify tab to game properties
Diffstat (limited to 'Source/Core/DolphinQt/Config/PropertiesDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/PropertiesDialog.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/Config/PropertiesDialog.cpp b/Source/Core/DolphinQt/Config/PropertiesDialog.cpp index 6a29c9ffee..6aae9bef5d 100644 --- a/Source/Core/DolphinQt/Config/PropertiesDialog.cpp +++ b/Source/Core/DolphinQt/Config/PropertiesDialog.cpp @@ -2,12 +2,15 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include <memory> + #include <QDialogButtonBox> #include <QPushButton> #include <QTabWidget> #include <QVBoxLayout> #include "DiscIO/Enums.h" +#include "DiscIO/Volume.h" #include "DolphinQt/Config/ARCodeWidget.h" #include "DolphinQt/Config/FilesystemWidget.h" @@ -16,6 +19,7 @@ #include "DolphinQt/Config/InfoWidget.h" #include "DolphinQt/Config/PatchesWidget.h" #include "DolphinQt/Config/PropertiesDialog.h" +#include "DolphinQt/Config/VerifyWidget.h" #include "DolphinQt/QtUtils/WrapInScrollArea.h" #include "UICommon/GameFile.h" @@ -54,11 +58,22 @@ PropertiesDialog::PropertiesDialog(QWidget* parent, const UICommon::GameFile& ga tr("Gecko Codes")); tab_widget->addTab(GetWrappedWidget(info, this, padding_width, padding_height), tr("Info")); - if (DiscIO::IsDisc(game.GetPlatform())) + if (game.GetPlatform() != DiscIO::Platform::ELFOrDOL) { - FilesystemWidget* filesystem = new FilesystemWidget(game); - tab_widget->addTab(GetWrappedWidget(filesystem, this, padding_width, padding_height), - tr("Filesystem")); + std::shared_ptr<DiscIO::Volume> volume = DiscIO::CreateVolumeFromFilename(game.GetFilePath()); + if (volume) + { + VerifyWidget* verify = new VerifyWidget(volume); + tab_widget->addTab(GetWrappedWidget(verify, this, padding_width, padding_height), + tr("Verify")); + + if (DiscIO::IsDisc(game.GetPlatform())) + { + FilesystemWidget* filesystem = new FilesystemWidget(volume); + tab_widget->addTab(GetWrappedWidget(filesystem, this, padding_width, padding_height), + tr("Filesystem")); + } + } } layout->addWidget(tab_widget); |
