summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-06-20 15:48:55 +0200
committerJosJuice <josjuice@gmail.com>2017-06-28 22:23:10 +0200
commit94b18bfb0781e36e074d2d02c8180cc447256cc3 (patch)
treec2d03eebc19b16b2c847ba8b8f5fe954dc546b08 /Source/Core
parent0b068d84d58e4e6584672c5e1a632df8ad67df5c (diff)
FilesystemPanel: Replace Extract Apploader/DOL with Extract System Data
Because having one option for each thing to extract is going to be way too many options once I add support for more things to extract.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp22
-rw-r--r--Source/Core/DolphinWX/ISOProperties/FilesystemPanel.h5
2 files changed, 6 insertions, 21 deletions
diff --git a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
index 24d0d8a3ee..d0da889c47 100644
--- a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
+++ b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
@@ -126,8 +126,7 @@ void FilesystemPanel::BindEvents()
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractFile, this, ID_EXTRACT_FILE);
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractAll, this, ID_EXTRACT_ALL);
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractDirectories, this, ID_EXTRACT_DIR);
- Bind(wxEVT_MENU, &FilesystemPanel::OnExtractHeaderData, this, ID_EXTRACT_APPLOADER);
- Bind(wxEVT_MENU, &FilesystemPanel::OnExtractHeaderData, this, ID_EXTRACT_DOL);
+ Bind(wxEVT_MENU, &FilesystemPanel::OnExtractSystemData, this, ID_EXTRACT_SYSTEM_DATA);
Bind(wxEVT_MENU, &FilesystemPanel::OnCheckPartitionIntegrity, this, ID_CHECK_INTEGRITY);
}
@@ -203,10 +202,7 @@ void FilesystemPanel::OnRightClickTree(wxTreeEvent& event)
if (image_type == ICON_DISC)
{
if (!is_parent_of_partitions)
- {
- menu.Append(ID_EXTRACT_APPLOADER, _("Extract Apploader..."));
- menu.Append(ID_EXTRACT_DOL, _("Extract DOL..."));
- }
+ menu.Append(ID_EXTRACT_SYSTEM_DATA, _("Extract System Data..."));
if (first_visible_item == selection)
menu.Append(ID_EXTRACT_ALL, _("Extract Entire Disc..."));
@@ -247,7 +243,7 @@ void FilesystemPanel::OnExtractDirectories(wxCommandEvent& event)
ExtractSingleDirectory(extract_path);
}
-void FilesystemPanel::OnExtractHeaderData(wxCommandEvent& event)
+void FilesystemPanel::OnExtractSystemData(wxCommandEvent& event)
{
const wxString path = wxDirSelector(_("Choose the folder to extract to"));
@@ -267,17 +263,7 @@ void FilesystemPanel::OnExtractHeaderData(wxCommandEvent& event)
partition = DiscIO::PARTITION_NONE;
}
- bool ret = false;
- if (event.GetId() == ID_EXTRACT_APPLOADER)
- {
- ret = DiscIO::ExportApploader(*m_opened_iso, partition, WxStrToStr(path) + "/apploader.img");
- }
- else if (event.GetId() == ID_EXTRACT_DOL)
- {
- ret = DiscIO::ExportDOL(*m_opened_iso, partition, WxStrToStr(path) + "/boot.dol");
- }
-
- if (!ret)
+ if (!DiscIO::ExportSystemData(*m_opened_iso, partition, WxStrToStr(path)))
{
WxUtils::ShowErrorDialog(
wxString::Format(_("Failed to extract to %s!"), WxStrToStr(path).c_str()));
diff --git a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.h b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.h
index 040c2b79ad..59da51ce95 100644
--- a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.h
+++ b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.h
@@ -32,8 +32,7 @@ private:
ID_EXTRACT_DIR = 20000,
ID_EXTRACT_ALL,
ID_EXTRACT_FILE,
- ID_EXTRACT_APPLOADER,
- ID_EXTRACT_DOL,
+ ID_EXTRACT_SYSTEM_DATA,
ID_CHECK_INTEGRITY,
};
@@ -45,7 +44,7 @@ private:
void OnRightClickTree(wxTreeEvent&);
void OnExtractFile(wxCommandEvent&);
void OnExtractDirectories(wxCommandEvent&);
- void OnExtractHeaderData(wxCommandEvent&);
+ void OnExtractSystemData(wxCommandEvent&);
void OnExtractAll(wxCommandEvent&);
void OnCheckPartitionIntegrity(wxCommandEvent&);