Prevent LLE debugging window to start before boot. I don't know if the plugin can get the CPU state, if it can perhaps it's better to have that check in the plugin.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@730 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2008-09-29 18:14:46 +00:00
parent df9eba79b2
commit ba0b277597
1 changed files with 43 additions and 12 deletions

View File

@ -283,13 +283,25 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
if(IsLoggingActivated() && bSoundWindow)
{
// no if() check here?
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
if(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.find("LLE") != -1)
// no match = -1, in that case this is ignored
{
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
// possible todo: add some kind of if here to? can it fail?
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
} // don't have any else, just ignore it
}
else
{
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
}
}
}
@ -836,11 +848,30 @@ void CCodeWindow::OnToggleSoundWindow(wxCommandEvent& event)
if (IsLoggingActivated() && show)
{
// TODO: add some kind of if?
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
// we only need to prevent this with the LLE, therefore this check
if(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.find("LLE") != -1)
// no match = -1, in that case this is ignored
{
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
// TODO: add some kind of if here to?
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
} else {
event.Skip();
wxMessageBox(_T("Please start the emulator before doing this."));
}
}
else
{
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
}
}
else // hide
{