diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index 8d09f63091..5232bdea1f 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -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); diff --git a/Source/Core/DolphinQt2/WiiUpdate.cpp b/Source/Core/DolphinQt2/WiiUpdate.cpp index b7e840f21e..cd9b0275e0 100644 --- a/Source/Core/DolphinQt2/WiiUpdate.cpp +++ b/Source/Core/DolphinQt2/WiiUpdate.cpp @@ -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 diff --git a/Source/Core/DolphinQt2/WiiUpdate.h b/Source/Core/DolphinQt2/WiiUpdate.h index 19b7b8f463..cfeb6a7402 100644 --- a/Source/Core/DolphinQt2/WiiUpdate.h +++ b/Source/Core/DolphinQt2/WiiUpdate.h @@ -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