WX: Add menu item to perform system update from disc
This commit is contained in:
parent
0fdae2adb8
commit
0e71c0760e
|
@ -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)
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue