diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2017-08-24 15:11:04 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2017-08-28 23:00:14 +0200 |
| commit | 9469fc3d6fef425fced1c9e0c05c50dddb3b1966 (patch) | |
| tree | 1a44a2132bc647cfa16890697192afe2bbeab6e8 /Source/Core/DolphinQt2/MenuBar.cpp | |
| parent | 1705d15d6f3fe1c2f760a4b6bc70542d94b9e9f2 (diff) | |
Qt: Implement "Import Wii Save"
Diffstat (limited to 'Source/Core/DolphinQt2/MenuBar.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/MenuBar.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/MenuBar.cpp b/Source/Core/DolphinQt2/MenuBar.cpp index b599c99f53..56c5ff480e 100644 --- a/Source/Core/DolphinQt2/MenuBar.cpp +++ b/Source/Core/DolphinQt2/MenuBar.cpp @@ -11,6 +11,7 @@ #include "Core/CommonTitles.h" #include "Core/ConfigManager.h" +#include "Core/HW/WiiSaveCrypted.h" #include "Core/IOS/ES/ES.h" #include "Core/IOS/IOS.h" #include "Core/State.h" @@ -86,6 +87,11 @@ void MenuBar::AddFileMenu() void MenuBar::AddToolsMenu() { QMenu* tools_menu = addMenu(tr("&Tools")); + + tools_menu->addAction(tr("Import Wii Save..."), this, &MenuBar::ImportWiiSave); + + tools_menu->addSeparator(); + m_wad_install_action = tools_menu->addAction(tr("Install WAD..."), this, &MenuBar::InstallWAD); tools_menu->addAction(tr("Start &NetPlay..."), this, &MenuBar::StartNetPlay); @@ -411,3 +417,13 @@ void MenuBar::InstallWAD() result_dialog.exec(); } + +void MenuBar::ImportWiiSave() +{ + QString file = QFileDialog::getOpenFileName(this, tr("Select the save file"), QDir::currentPath(), + tr("Wii save files (*.bin);;" + "All Files (*)")); + + if (!file.isEmpty()) + CWiiSaveCrypted::ImportWiiSave(file.toStdString()); +} |
