buildfix and some cleanup

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2026 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-01-28 16:51:05 +00:00
parent 30523b570c
commit 121be22532
4 changed files with 55 additions and 74 deletions

View File

@ -240,7 +240,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_LIST_ITEM_ACTIVATED(LIST_CTRL, CFrame::OnGameListCtrl_ItemActivated)
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
#if wxUSE_TIMER
EVT_TIMER(wxID_ANY, CFrame::OnTimer)
@ -412,10 +412,11 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
}
void CFrame::OnEvent_ListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
{
BootGame();
}
void CFrame::OnKeyDown(wxKeyEvent& event)
{
// Toggle fullscreen from Alt + Enter or Esc
@ -593,28 +594,4 @@ 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);
}
}
//////////////////////////////////////////

View File

@ -202,7 +202,7 @@ class CFrame : public wxFrame
void OnMemcard(wxCommandEvent& event); // Misc
void OnShow_CheatsWindow(wxCommandEvent& event);
void OnEvent_ListCtrl_ItemActivated(wxListEvent& event);
void OnGameListCtrl_ItemActivated(wxListEvent& event);
// Menu items
wxMenuBar* m_pMenuBar;

View File

@ -341,6 +341,50 @@ void CFrame::InitBitmaps()
if (GetToolBar() != NULL) RecreateToolbar();
}
void CFrame::BootGame()
{
#ifdef MUSICMOD // Music modification
MM_OnPlay();
#endif
// shuffle2: wxBusyInfo is meant to be created on the stack
// and only stay around for the life of the scope it's in.
// If that is not what we want, find another solution. I don't
// think such a dialog is needed anyways, so maybe kill it?
wxBusyInfo bootingDialog(wxString::FromAscii("Booting..."), this);
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
if (Core::GetState() == Core::CORE_RUN)
{
Core::SetState(Core::CORE_PAUSE);
}
else
{
Core::SetState(Core::CORE_RUN);
}
UpdateGUI();
}
// Start the selected ISO
else 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);
}
}
// =======================================================
// Open file to boot or for changing disc
@ -441,47 +485,7 @@ void CFrame::OnBrowse(wxCommandEvent& WXUNUSED (event))
// -------------
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
{
#ifdef MUSICMOD // Music modification
MM_OnPlay();
#endif
// shuffle2: wxBusyInfo is meant to be created on the stack
// and only stay around for the life of the scope it's in.
// If that is not what we want, find another solution. I don't
// think such a dialog is needed anyways, so maybe kill it?
wxBusyInfo bootingDialog(wxString::FromAscii("Booting..."), this);
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
if (Core::GetState() == Core::CORE_RUN)
{
Core::SetState(Core::CORE_PAUSE);
}
else
{
Core::SetState(Core::CORE_RUN);
}
UpdateGUI();
}
// Start the selected ISO
else 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);
}
BootGame();
}
// =============

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="Plugin_Wiimote"
ProjectGUID="{8D612734-FAA5-4B8A-804F-4DEA2367D495}"
RootNamespace="Plugin_Wiimote"
@ -67,7 +67,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib wiiuse.lib rpcrt4.lib"
AdditionalDependencies="comctl32.lib winmm.lib wiiuse.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_WiimoteD.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\Externals\WiiUse\win32"
@ -151,7 +151,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib wiiuse.lib rpcrt4.lib"
AdditionalDependencies="comctl32.lib winmm.lib wiiuse.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_WiimoteD.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\Externals\WiiUse\x64"
@ -316,7 +316,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib wiiuse.lib"
AdditionalDependencies="comctl32.lib winmm.lib wiiuse.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_Wiimote.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\Externals\WiiUse\x64"
@ -396,7 +396,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NODEFAULTLIB:msvcrt.lib"
AdditionalDependencies="comctl32.lib wiiuse.lib"
AdditionalDependencies="comctl32.lib winmm.lib wiiuse.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_WiimoteDF.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\Externals\WiiUse\win32"
@ -476,7 +476,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib wiiuse.lib"
AdditionalDependencies="comctl32.lib winmm.lib wiiuse.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_WiimoteDF.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\Externals\WiiUse\x64"