summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp
diff options
context:
space:
mode:
authorJohn Peterson <jpeterson57@gmail.com>2008-10-06 18:40:34 +0000
committerJohn Peterson <jpeterson57@gmail.com>2008-10-06 18:40:34 +0000
commitf4b9a223241289fa0f83b7cd8895366d890b2cd1 (patch)
tree815e2c3f352aa59f62d55f34bf67d37c67f10b8c /Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp
parent037e3d044284c1957b5ca72701cd66a59da3e406 (diff)
Attempt to fix a sound problem that could appear in SSBM, Battle Stadium DON and perhaps other games. Please report any side effects.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@785 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp')
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp84
1 files changed, 81 insertions, 3 deletions
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp
index 7aba8938e0..1d129baebf 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp
@@ -26,6 +26,9 @@
// externals
extern int gUpdFreq;
+extern bool gSSBM;
+extern bool gSSBMremedy1;
+extern bool gSSBMremedy2;
// =======================================================================================
// Declare events
@@ -33,6 +36,9 @@ BEGIN_EVENT_TABLE(CDebugger,wxDialog)
EVT_CLOSE(CDebugger::OnClose)
EVT_BUTTON(ID_UPD,CDebugger::OnUpdate)
EVT_CHECKBOX(IDC_CHECK2,CDebugger::ShowHideConsole)
+ EVT_CHECKBOX(IDC_CHECK3,CDebugger::SSBM)
+ EVT_CHECKBOX(IDC_CHECK4,CDebugger::SSBMremedy1)
+ EVT_CHECKBOX(IDC_CHECK5,CDebugger::SSBMremedy2)
EVT_RADIOBOX(IDC_RADIO1,CDebugger::ChangeFrequency)
END_EVENT_TABLE()
// =======================================================================================
@@ -131,7 +137,30 @@ SetTitle(wxT("Sound Debugging"));
m_checkSizer->Add(m_Check[1], 0, 0, 5);
m_checkSizer->Add(m_Check[2], 0, 0, 5);
// ------------------------
+
+ // settings checkboxes -----------------------------------------------------
+ m_Label[1] = new wxStaticBox(this, IDG_LABEL2, wxT("Settings"),
+ wxDefaultPosition, wxDefaultSize, 0);
+ wxStaticBoxSizer * m_checkSizer2 = new wxStaticBoxSizer (m_Label[1], wxVERTICAL);
+
+ // checkboxes
+ m_Check[3] = new wxCheckBox(this, IDC_CHECK3, wxT("SSBM fix"),
+ wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+ m_Check[3]->SetValue(gSSBM);
+ m_Check[4] = new wxCheckBox(this, IDC_CHECK4, wxT("SSBM remedy 1"),
+ wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+ m_Check[4]->SetValue(gSSBMremedy1);
+ m_Check[5] = new wxCheckBox(this, IDC_CHECK5, wxT("SSBM remedy 2"),
+ wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
+ m_Check[5]->SetValue(gSSBMremedy2);
+
+ m_checkSizer2->Add(m_Check[3], 0, 0, 5);
+ m_checkSizer2->Add(m_Check[4], 0, 0, 5);
+ m_checkSizer2->Add(m_Check[5], 0, 0, 5);
+ // ------------------------
+
+
// radio boxes -----------------------------------------------------
int m_radioBoxNChoices[2];
@@ -154,12 +183,18 @@ SetTitle(wxT("Sound Debugging"));
m_Presets = new wxButton(this, ID_PRESETS, wxT("Presets"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- sLeft = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Current Status"));
+ // right buttons
+ wxBoxSizer* sButtons2;
+ sButtons2 = new wxBoxSizer(wxVERTICAL);
+
+ sButtons2->AddStretchSpacer(1);
+ sButtons2->Add(m_checkSizer2, 0, 2, 5);
+ sButtons2->AddStretchSpacer(1);
+ // left buttons
wxBoxSizer* sButtons;
sButtons = new wxBoxSizer(wxVERTICAL);
-
sButtons->AddStretchSpacer(1);
sButtons->Add(m_Upd, 0, 0, 5);
@@ -180,13 +215,16 @@ SetTitle(wxT("Sound Debugging"));
sButtons->AddStretchSpacer(1);
-
+ // blocks view
+ sLeft = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Current Status"));
sLeft->Add(m_GPRListView, 1, wxEXPAND|wxALL, 5);
+ // add all stuff to the main container
sMain = new wxBoxSizer(wxHORIZONTAL);
sMain->Add(sLeft, 1, wxEXPAND|wxALL, 5);
sMain->Add(sButtons, 0, wxEXPAND, 0);
+ sMain->Add(sButtons2, 0, wxEXPAND, 0);
this->SetSizer(sMain);
sMain->SetSizeHints(this);
@@ -208,6 +246,38 @@ void CDebugger::OnUpdate(wxCommandEvent& /*event*/)
this->NotifyUpdate();
}
+
+// =======================================================================================
+// Settings
+// --------------
+void CDebugger::SSBM(wxCommandEvent& event)
+{
+ if(m_Check[3]->IsChecked() == 1)
+ {gSSBM = true;}
+ else
+ {gSSBM = false;}
+}
+
+void CDebugger::SSBMremedy1(wxCommandEvent& event)
+{
+ if(m_Check[4]->IsChecked() == 1)
+ {gSSBMremedy1 = true;}
+ else
+ {gSSBMremedy1 = false;}
+}
+void CDebugger::SSBMremedy2(wxCommandEvent& event)
+{
+ if(m_Check[5]->IsChecked() == 1)
+ {gSSBMremedy2 = true;}
+ else
+ {gSSBMremedy2 = false;}
+}
+// =======================================================================================
+
+
+// =======================================================================================
+// Change update frequency
+// --------------
void CDebugger::ChangeFrequency(wxCommandEvent& event)
{
DoChangeFrequency();
@@ -228,7 +298,13 @@ void CDebugger::DoChangeFrequency()
gUpdFreq = 30;
}
}
+// ==============
+
+
+// =======================================================================================
+// Show or hide console window
+// --------------
void CDebugger::ShowHideConsole(wxCommandEvent& event)
{
DoShowHideConsole();
@@ -247,6 +323,8 @@ void CDebugger::DoShowHideConsole()
CloseConsole();
}
}
+// ==============
+
void CDebugger::NotifyUpdate()
{