summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/Src/CodeWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DebuggerWX/Src/CodeWindow.cpp')
-rw-r--r--Source/Core/DebuggerWX/Src/CodeWindow.cpp55
1 files changed, 43 insertions, 12 deletions
diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp
index 066e031ba0..6850bd29f3 100644
--- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp
+++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp
@@ -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
{