From dcde91cdd8e8105fe38ec04c9ff47798cdf5d626 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 6 Jan 2016 22:25:30 +0100 Subject: DolphinWX: Unify the condition for the game list being empty When there are no games to display in the game list, DolphinWX shows a message instead. Clicking the message will perform an action. If the game list truly is empty, the message and action are for opening a browse dialog, but if the user has hidden some games, they are instead for unhiding all games. However, the condition for checking which message to display lacked some parts that are in the condition for checking which action to use, so the two could be different in rare cases. This PR fixes that by breaking out the two conditions to a new unified function. --- Source/Core/DolphinWX/Frame.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'Source/Core/DolphinWX/Frame.cpp') diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 605e24e424..b24584ca97 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -870,25 +870,7 @@ void CFrame::OnGameListCtrlItemActivated(wxListEvent& WXUNUSED(event)) // 1. Boot the selected iso // 2. Boot the default or last loaded iso. // 3. Call BrowseForDirectory if the gamelist is empty - if (!m_GameListCtrl->GetISO(0) && - !((SConfig::GetInstance().m_ListGC && - SConfig::GetInstance().m_ListWii && - SConfig::GetInstance().m_ListWad && - SConfig::GetInstance().m_ListElfDol) && - (SConfig::GetInstance().m_ListJap && - SConfig::GetInstance().m_ListUsa && - SConfig::GetInstance().m_ListPal && - SConfig::GetInstance().m_ListAustralia && - SConfig::GetInstance().m_ListFrance && - SConfig::GetInstance().m_ListGermany && - SConfig::GetInstance().m_ListItaly && - SConfig::GetInstance().m_ListKorea && - SConfig::GetInstance().m_ListNetherlands && - SConfig::GetInstance().m_ListRussia && - SConfig::GetInstance().m_ListSpain && - SConfig::GetInstance().m_ListTaiwan && - SConfig::GetInstance().m_ListWorld && - SConfig::GetInstance().m_ListUnknown))) + if (!m_GameListCtrl->GetISO(0) && CGameListCtrl::IsHidingItems()) { SConfig::GetInstance().m_ListGC = SConfig::GetInstance().m_ListWii = -- cgit v1.2.3