mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Some code cleanup in DolphinWx.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1818 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -241,6 +241,7 @@ EVT_MENU_RANGE(IDM_LOADSLOT1, IDM_LOADSLOT10, CFrame::OnLoadState)
|
||||
EVT_MENU_RANGE(IDM_SAVESLOT1, IDM_SAVESLOT10, CFrame::OnSaveState)
|
||||
|
||||
EVT_SIZE(CFrame::OnResize)
|
||||
EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, CFrame::OnEvent_ListCtrl_ItemActivated)
|
||||
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
|
||||
#if wxUSE_TIMER
|
||||
EVT_TIMER(wxID_ANY, CFrame::OnTimer)
|
||||
@ -412,6 +413,10 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void CFrame::OnEvent_ListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||
{
|
||||
BootGame();
|
||||
}
|
||||
void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
// Toggle fullscreen from Alt + Enter or Esc
|
||||
@ -589,6 +594,27 @@ void CFrame::Update()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
void CFrame::BootGame()
|
||||
{
|
||||
// Start the selected ISO
|
||||
if (m_GameListCtrl->GetSelectedISO() != 0)
|
||||
{
|
||||
BootManager::BootCore(m_GameListCtrl->GetSelectedISO()->GetFileName());
|
||||
}
|
||||
|
||||
// Start the default ISO, or if we don't have a default ISO, start the last started ISO
|
||||
else if (!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.empty() &&
|
||||
wxFileExists(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.c_str(), wxConvUTF8)))
|
||||
{
|
||||
BootManager::BootCore(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||
}
|
||||
|
||||
else if (!SConfig::GetInstance().m_LastFilename.empty() &&
|
||||
wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
|
||||
{
|
||||
BootManager::BootCore(SConfig::GetInstance().m_LastFilename);
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user