Merge pull request #3466 from JosJuice/game-list-empty-condition
DolphinWX: Unify the condition for the game list being empty
This commit is contained in:
commit
4553f723ff
|
@ -870,25 +870,7 @@ void CFrame::OnGameListCtrlItemActivated(wxListEvent& WXUNUSED(event))
|
||||||
// 1. Boot the selected iso
|
// 1. Boot the selected iso
|
||||||
// 2. Boot the default or last loaded iso.
|
// 2. Boot the default or last loaded iso.
|
||||||
// 3. Call BrowseForDirectory if the gamelist is empty
|
// 3. Call BrowseForDirectory if the gamelist is empty
|
||||||
if (!m_GameListCtrl->GetISO(0) &&
|
if (!m_GameListCtrl->GetISO(0) && CGameListCtrl::IsHidingItems())
|
||||||
!((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)))
|
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_ListGC =
|
SConfig::GetInstance().m_ListGC =
|
||||||
SConfig::GetInstance().m_ListWii =
|
SConfig::GetInstance().m_ListWii =
|
||||||
|
|
|
@ -310,20 +310,14 @@ void CGameListCtrl::Update()
|
||||||
wxString errorString;
|
wxString errorString;
|
||||||
// We just check for one hide setting to be enabled, as we may only
|
// We just check for one hide setting to be enabled, as we may only
|
||||||
// have GC games for example, and hide them, so we should show the
|
// have GC games for example, and hide them, so we should show the
|
||||||
// second message instead
|
// first message instead
|
||||||
if ((SConfig::GetInstance().m_ListGC &&
|
if (IsHidingItems())
|
||||||
SConfig::GetInstance().m_ListWii &&
|
|
||||||
SConfig::GetInstance().m_ListWad &&
|
|
||||||
SConfig::GetInstance().m_ListElfDol) &&
|
|
||||||
(SConfig::GetInstance().m_ListJap &&
|
|
||||||
SConfig::GetInstance().m_ListUsa &&
|
|
||||||
SConfig::GetInstance().m_ListPal))
|
|
||||||
{
|
{
|
||||||
errorString = _("Dolphin could not find any GameCube/Wii ISOs or WADs. Double-click here to browse for files...");
|
errorString = _("Dolphin is currently set to hide all games. Double-click here to show all games...");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorString = _("Dolphin is currently set to hide all games. Double-click here to show all games...");
|
errorString = _("Dolphin could not find any GameCube/Wii ISOs or WADs. Double-click here to browse for files...");
|
||||||
}
|
}
|
||||||
InsertColumn(0, "");
|
InsertColumn(0, "");
|
||||||
long index = InsertItem(0, errorString);
|
long index = InsertItem(0, errorString);
|
||||||
|
@ -956,6 +950,28 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CGameListCtrl::IsHidingItems()
|
||||||
|
{
|
||||||
|
return !(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);
|
||||||
|
}
|
||||||
|
|
||||||
void CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event))
|
void CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
const GameListItem* iso = GetSelectedISO();
|
const GameListItem* iso = GetSelectedISO();
|
||||||
|
|
|
@ -39,6 +39,8 @@ public:
|
||||||
const GameListItem *GetSelectedISO();
|
const GameListItem *GetSelectedISO();
|
||||||
const GameListItem *GetISO(size_t index) const;
|
const GameListItem *GetISO(size_t index) const;
|
||||||
|
|
||||||
|
static bool IsHidingItems();
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
COLUMN_DUMMY = 0,
|
COLUMN_DUMMY = 0,
|
||||||
|
|
Loading…
Reference in New Issue