don't fool with sysconf if you're booting a gc game, and add back ability to double click on initial gamelistitem in order to add a GCMPath.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1922 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-01-19 01:30:54 +00:00
parent 4930a6d6cb
commit 5708e14a0e
2 changed files with 61 additions and 45 deletions

View File

@ -141,6 +141,8 @@ bool BootCore(const std::string& _rFilename)
ini.Get("Core", "OptimizeQuantizers", &StartUp.bOptimizeQuantizers, StartUp.bOptimizeQuantizers); ini.Get("Core", "OptimizeQuantizers", &StartUp.bOptimizeQuantizers, StartUp.bOptimizeQuantizers);
ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack); ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
if (StartUp.bWii)
{
// ------------------------------------------------ // ------------------------------------------------
// Update SYSCONF with game specific settings // Update SYSCONF with game specific settings
// ---------------- // ----------------
@ -190,6 +192,7 @@ bool BootCore(const std::string& _rFilename)
} }
// --------- // ---------
} }
}
// ============== // ==============
#if defined(HAVE_WX) && HAVE_WX #if defined(HAVE_WX) && HAVE_WX

View File

@ -106,7 +106,7 @@ void CGameListCtrl::BrowseForDirectory()
wxGetHomeDir(&dirHome); wxGetHomeDir(&dirHome);
// browse // browse
wxDirDialog dialog(this, _("Browse directory"), dirHome, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST); wxDirDialog dialog(this, _("Browse for a directory to add"), dirHome, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
@ -548,18 +548,31 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
} }
const GameListItem * CGameListCtrl::GetSelectedISO() const GameListItem * CGameListCtrl::GetSelectedISO()
{
if (m_ISOFiles.size() == 0)
{
// There are no detected games, so add a GCMPath
BrowseForDirectory();
return 0;
}
else
{ {
long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (item == -1) if (item == -1) // -1 means the selection is bogus, not a gamelistitem
return 0; return 0;
else else
{ {
// Here is a little workaround for multiselections:
// when > 1 item is selected, return info on the first one
// and deselect it so the next time GetSelectedISO() is called,
// the next item's info is returned
if (GetSelectedItemCount() > 1) if (GetSelectedItemCount() > 1)
SetItemState(item, 0, wxLIST_STATE_SELECTED); SetItemState(item, 0, wxLIST_STATE_SELECTED);
return &m_ISOFiles[GetItemData(item)]; return &m_ISOFiles[GetItemData(item)];
} }
} }
}
void CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event)) void CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event))
{ {