mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
Qt: Add menu item to perform system update from disc
This commit is contained in:
parent
0e71c0760e
commit
ea3b351d92
@ -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);
|
||||
|
@ -139,4 +139,10 @@ void PerformOnlineUpdate(const std::string& region, QWidget* parent)
|
||||
const WiiUtils::UpdateResult result = ShowProgress(parent, WiiUtils::DoOnlineUpdate, region);
|
||||
ShowResult(parent, result);
|
||||
}
|
||||
|
||||
void PerformDiscUpdate(const std::string& file_path, QWidget* parent)
|
||||
{
|
||||
const WiiUtils::UpdateResult result = ShowProgress(parent, WiiUtils::DoDiscUpdate, file_path);
|
||||
ShowResult(parent, result);
|
||||
}
|
||||
} // namespace WiiUpdate
|
||||
|
@ -11,4 +11,5 @@ class QWidget;
|
||||
namespace WiiUpdate
|
||||
{
|
||||
void PerformOnlineUpdate(const std::string& region, QWidget* parent = nullptr);
|
||||
void PerformDiscUpdate(const std::string& file_path, QWidget* parent = nullptr);
|
||||
} // namespace WiiUpdate
|
||||
|
Loading…
x
Reference in New Issue
Block a user