diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 9a00225ab5..25c4d6d47d 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -508,8 +508,8 @@ void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event)) // 2. All Regions are set to hide // Otherwise call BootGame to either... // 1. Boot the selected iso - // 2. Call BrowseForDirectory and boot the default or last loaded iso. - // TODO: (LPFaint99) We shouldn't boot an iso after BrowseForDirectory + // 2. Boot the default or last loaded iso. + // 3. Call BrowseForDirectory if the gamelist is empty if (!m_GameListCtrl->GetGameNames().size() && !((SConfig::GetInstance().m_ListGC || SConfig::GetInstance().m_ListWii || diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index e24282bb58..a3e63928a1 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -420,8 +420,9 @@ void CFrame::BootGame() } UpdateGUI(); } - // Start the selected ISO - else if (m_GameListCtrl->GetSelectedISO() != 0) + // Start the selected ISO, return if gamelist is empty + else if (m_GameListCtrl->GetSelectedISO() == 0) return; + else if (m_GameListCtrl->GetSelectedISO()->IsValid()) { BootManager::BootCore(m_GameListCtrl->GetSelectedISO()->GetFileName()); } @@ -462,7 +463,7 @@ void CFrame::DoOpen(bool Boot) wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this); - bool fileChosen = path ? true : false; + bool fileChosen = !path.IsEmpty(); std::string currentDir2 = File::GetCurrentDirectory(); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 2766a23c4b..ffbfdfe678 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -727,8 +727,8 @@ const GameListItem * CGameListCtrl::GetSelectedISO() else { long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); - if (item == -1) // -1 means the selection is bogus, not a gamelistitem - return 0; + if (item == wxNOT_FOUND) + return new GameListItem(""); else { // Here is a little workaround for multiselections: