Qt: Implement "Import Wii Save"

This commit is contained in:
spycrab 2017-08-24 15:11:04 +02:00
parent 1705d15d6f
commit 9469fc3d6f
2 changed files with 17 additions and 0 deletions

View File

@ -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());
}

View File

@ -24,6 +24,7 @@ public:
// Tools
void InstallWAD();
void ImportWiiSave();
signals:
// File