From d8089a457fb674f4bd4e02583e2efbdbf118a161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 29 Mar 2017 15:47:04 +0200 Subject: 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. --- Source/Core/DolphinWX/MainMenuBar.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Source/Core/DolphinWX/MainMenuBar.cpp') 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); -- cgit v1.2.3