summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2018-04-15 14:51:37 +0200
committerLéo Lam <leo@innovatetechnologi.es>2018-05-05 19:21:56 +0200
commit9aeb95bc0aeb013e5c27ac24bd6958b2c42c25ea (patch)
treed3c41a7a6e7ba99e17bdf15978ffb581e2a5fa9c /Source/Core
parent58b96eeb9df32030761af0aecbeb7a6b994d12eb (diff)
WX: Only call IsTitleInstalled when core is stopped
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp
index c0f7303e90..30c973eb42 100644
--- a/Source/Core/DolphinWX/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/GameListCtrl.cpp
@@ -897,10 +897,12 @@ void GameListCtrl::OnRightClick(wxMouseEvent& event)
auto* const uninstall_wad_item =
popupMenu.Append(IDM_LIST_UNINSTALL_WAD, _("Uninstall from the NAND"));
// These should not be allowed while emulation is running for safety reasons.
- for (auto* menu_item : {install_wad_item, uninstall_wad_item})
- menu_item->Enable(!Core::IsRunning() || !SConfig::GetInstance().bWii);
-
- if (!WiiUtils::IsTitleInstalled(selected_iso->GetTitleID()))
+ const bool can_enable = !Core::IsRunning() || !SConfig::GetInstance().bWii;
+ install_wad_item->Enable(can_enable);
+ // IsTitleInstalled should also only be called when nothing is using the NAND.
+ if (can_enable)
+ uninstall_wad_item->Enable(WiiUtils::IsTitleInstalled(selected_iso->GetTitleID()));
+ else
uninstall_wad_item->Enable(false);
}