summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-10-26 17:15:02 +0200
committerGitHub <noreply@github.com>2017-10-26 17:15:02 +0200
commitc4914fbb8b9d90e1acdd77ce7504a0e4c4dfd21f (patch)
treecbe6d36771633db3eab33dc8b6d643f3bc7440fb /Source/Core/DolphinWX/FrameTools.cpp
parent5393575c552c733be0df89fddf2493ab7437b389 (diff)
parent4cc1bd972a12186b320d5e1142f10ab145df3203 (diff)
Merge pull request #6094 from leoetlino/drop-wad-hack
Drop the direct WAD launch hack
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index 592f338cd2..05b819a99b 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -60,7 +60,6 @@
#include "Core/WiiUtils.h"
#include "DiscIO/Enums.h"
-#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/NANDImporter.h"
#include "DiscIO/VolumeWad.h"
@@ -652,6 +651,7 @@ void CFrame::StartGame(std::unique_ptr<BootParameters> boot)
if (m_is_game_loading)
return;
m_is_game_loading = true;
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
GetToolBar()->EnableTool(IDM_PLAY, false);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
@@ -925,6 +925,7 @@ void CFrame::OnStopped()
m_confirm_stop = false;
m_is_game_loading = false;
m_tried_graceful_shutdown = false;
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
UninhibitScreensaver();
@@ -1131,11 +1132,6 @@ void CFrame::OnUpdateInterpreterMenuItem(wxUpdateUIEvent& event)
event.Check(SConfig::GetInstance().iCPUCore == PowerPC::CORE_INTERPRETER);
}
-void CFrame::OnUpdateLoadWiiMenuItem(wxCommandEvent& WXUNUSED(event))
-{
- UpdateLoadWiiMenuItem();
-}
-
void CFrame::ClearStatusBar()
{
if (this->GetStatusBar()->IsEnabled())
@@ -1225,7 +1221,7 @@ void CFrame::OnShowCheatsWindow(wxCommandEvent& WXUNUSED(event))
void CFrame::OnLoadWiiMenu(wxCommandEvent& WXUNUSED(event))
{
- BootGame(Common::GetTitleContentPath(Titles::SYSTEM_MENU, Common::FROM_CONFIGURED_ROOT));
+ StartGame(std::make_unique<BootParameters>(BootParameters::NANDTitle{Titles::SYSTEM_MENU}));
}
void CFrame::OnInstallWAD(wxCommandEvent& event)
@@ -1260,7 +1256,7 @@ void CFrame::OnInstallWAD(wxCommandEvent& event)
wxPD_REMAINING_TIME | wxPD_SMOOTH);
if (WiiUtils::InstallWAD(fileName))
- UpdateLoadWiiMenuItem();
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
}
void CFrame::OnUninstallWAD(wxCommandEvent&)
@@ -1284,7 +1280,7 @@ void CFrame::OnUninstallWAD(wxCommandEvent&)
}
if (title_id == Titles::SYSTEM_MENU)
- UpdateLoadWiiMenuItem();
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
}
void CFrame::OnImportBootMiiBackup(wxCommandEvent& WXUNUSED(event))
@@ -1306,7 +1302,7 @@ void CFrame::OnImportBootMiiBackup(wxCommandEvent& WXUNUSED(event))
wxProgressDialog dialog(_("Importing NAND backup"), _("Working..."), 100, this,
wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH);
DiscIO::NANDImporter().ImportNANDBin(file_name, [&dialog] { dialog.Pulse(); });
- UpdateLoadWiiMenuItem();
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
}
void CFrame::OnCheckNAND(wxCommandEvent&)
@@ -1462,7 +1458,7 @@ void CFrame::OnPerformOnlineWiiUpdate(wxCommandEvent& event)
const WiiUtils::UpdateResult result = ShowUpdateProgress(this, WiiUtils::DoOnlineUpdate, region);
ShowUpdateResult(result);
- UpdateLoadWiiMenuItem();
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
}
void CFrame::OnPerformDiscWiiUpdate(wxCommandEvent&)
@@ -1475,12 +1471,7 @@ void CFrame::OnPerformDiscWiiUpdate(wxCommandEvent&)
const WiiUtils::UpdateResult result = ShowUpdateProgress(this, WiiUtils::DoDiscUpdate, file_name);
ShowUpdateResult(result);
- UpdateLoadWiiMenuItem();
-}
-
-void CFrame::UpdateLoadWiiMenuItem() const
-{
- GetMenuBar()->Refresh(true, nullptr);
+ wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
}
void CFrame::OnFifoPlayer(wxCommandEvent& WXUNUSED(event))