diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index ba689ac063..8997dd1687 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -245,6 +245,7 @@ BEGIN_EVENT_TABLE(CFrame, CRenderFrame) EVT_MENU_RANGE(IDM_FLOAT_LOG_WINDOW, IDM_FLOAT_CODE_WINDOW, CFrame::OnFloatWindow) // Game list context menu +EVT_MENU(IDM_LIST_PERFORM_DISC_UPDATE, CFrame::OnPerformDiscWiiUpdate) EVT_MENU(IDM_LIST_INSTALL_WAD, CFrame::OnInstallWAD) EVT_MENU(IDM_LIST_UNINSTALL_WAD, CFrame::OnUninstallWAD) diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 8884630398..79d9b3b5d5 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -347,6 +347,7 @@ private: void OnImportBootMiiBackup(wxCommandEvent& event); void OnExtractCertificates(wxCommandEvent& event); void OnPerformOnlineWiiUpdate(wxCommandEvent& event); + void OnPerformDiscWiiUpdate(wxCommandEvent& event); void OnFifoPlayer(wxCommandEvent& event); void OnConnectWiimote(wxCommandEvent& event); void GameListChanged(wxCommandEvent& event); diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 870cb6f28b..b2d8622ac9 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1411,6 +1411,19 @@ void CFrame::OnPerformOnlineWiiUpdate(wxCommandEvent& event) UpdateLoadWiiMenuItem(); } +void CFrame::OnPerformDiscWiiUpdate(wxCommandEvent&) +{ + const GameListItem* iso = m_game_list_ctrl->GetSelectedISO(); + if (!iso) + return; + + const std::string file_name = iso->GetFileName(); + + const WiiUtils::UpdateResult result = ShowUpdateProgress(this, WiiUtils::DoDiscUpdate, file_name); + ShowUpdateResult(result); + UpdateLoadWiiMenuItem(); +} + void CFrame::UpdateLoadWiiMenuItem() const { GetMenuBar()->Refresh(true, nullptr); diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index 4cd9f178f7..5d91ca7193 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -1173,6 +1173,13 @@ void GameListCtrl::OnRightClick(wxMouseEvent& event) changeDiscItem->Enable(Core::IsRunning()); } + if (platform == DiscIO::Platform::WII_DISC) + { + auto* const perform_update_item = + popupMenu.Append(IDM_LIST_PERFORM_DISC_UPDATE, _("Perform System Update")); + perform_update_item->Enable(!Core::IsRunning() || !SConfig::GetInstance().bWii); + } + if (platform == DiscIO::Platform::WII_WAD) { auto* const install_wad_item = diff --git a/Source/Core/DolphinWX/Globals.h b/Source/Core/DolphinWX/Globals.h index d85d5add8e..b72cf2686b 100644 --- a/Source/Core/DolphinWX/Globals.h +++ b/Source/Core/DolphinWX/Globals.h @@ -100,6 +100,7 @@ enum IDM_GAME_WIKI, IDM_LOAD_WII_MENU, IDM_MENU_INSTALL_WAD, + IDM_LIST_PERFORM_DISC_UPDATE, IDM_LIST_INSTALL_WAD, IDM_LIST_UNINSTALL_WAD, IDM_IMPORT_NAND,