summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/MainMenuBar.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-03-29 15:47:04 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-04-05 20:54:48 +0200
commitd8089a457fb674f4bd4e02583e2efbdbf118a161 (patch)
tree24550276e001c3dc603e5b15411061da004d1fa8 /Source/Core/DolphinWX/MainMenuBar.cpp
parent4c0a3926988bc1b0e1577d7f3160e4af7ce91410 (diff)
WX: Disable a few menu items when a Wii title is running
Unsafe and keeping them enabled would allow inaccurate behaviour that can break games.
Diffstat (limited to 'Source/Core/DolphinWX/MainMenuBar.cpp')
-rw-r--r--Source/Core/DolphinWX/MainMenuBar.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/MainMenuBar.cpp b/Source/Core/DolphinWX/MainMenuBar.cpp
index 3fda28cdf6..3dc8736d14 100644
--- a/Source/Core/DolphinWX/MainMenuBar.cpp
+++ b/Source/Core/DolphinWX/MainMenuBar.cpp
@@ -514,7 +514,7 @@ void MainMenuBar::RefreshMenuLabels() const
{
RefreshPlayMenuLabel();
RefreshSaveStateMenuLabels();
- RefreshWiiSystemMenuLabel();
+ RefreshWiiToolsLabels();
}
void MainMenuBar::RefreshPlayMenuLabel() const
@@ -545,6 +545,21 @@ void MainMenuBar::RefreshSaveStateMenuLabels() const
}
}
+void MainMenuBar::RefreshWiiToolsLabels() const
+{
+ RefreshWiiSystemMenuLabel();
+
+ // The Install WAD option should not be enabled while emulation is running, because
+ // having unexpected title changes can confuse emulated software; and of course, this is
+ // not possible on a real Wii and won't be if we have IOS LLE (or simply more accurate IOS HLE).
+ //
+ // For similar reasons, it should not be possible to export or import saves, because this can
+ // result in the emulated software being confused, or even worse, exported saves having
+ // inconsistent data.
+ for (const int index : {IDM_MENU_INSTALL_WAD, IDM_EXPORT_ALL_SAVE, IDM_IMPORT_SAVE})
+ FindItem(index)->Enable(!Core::IsRunning() || !SConfig::GetInstance().bWii);
+}
+
void MainMenuBar::RefreshWiiSystemMenuLabel() const
{
auto* const item = FindItem(IDM_LOAD_WII_MENU);