Qt: Add menu item to perform system update from disc

This commit is contained in:
Léo Lam
2017-07-04 18:45:37 +02:00
parent 0e71c0760e
commit ea3b351d92
3 changed files with 17 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include "DolphinQt2/GameList/ListProxyModel.h"
#include "DolphinQt2/QtUtils/DoubleClickEventFilter.h"
#include "DolphinQt2/Settings.h"
#include "DolphinQt2/WiiUpdate.h"
static bool CompressCB(const std::string&, float, void*);
@ -164,6 +165,15 @@ void GameList::ShowContextMenu(const QPoint&)
menu->addSeparator();
}
if (platform == DiscIO::Platform::WII_DISC)
{
menu->addAction(tr("Perform System Update"), [this] {
WiiUpdate::PerformDiscUpdate(GetSelectedGame().toStdString(), this);
});
menu->setEnabled(!Core::IsRunning() || !SConfig::GetInstance().bWii);
}
if (platform == DiscIO::Platform::WII_WAD)
{
QAction* wad_install_action = new QAction(tr("Install to the NAND"), menu);