mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
Lots more work on making the frame aui stuff functional.
Also added a DSPCORE_STOP state. The DSP-LLE debugger window segmentation faults if it is openned when a game is not running. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5931 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -32,6 +32,12 @@ void DSPDebugInterface::disasm(unsigned int address, char *dest, int max_size)
|
||||
|
||||
void DSPDebugInterface::getRawMemoryString(int memory, unsigned int address, char *dest, int max_size)
|
||||
{
|
||||
if (DSPCore_GetState() == DSPCORE_STOP)
|
||||
{
|
||||
dest[0] = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (memory) {
|
||||
case 0: // IMEM
|
||||
switch (address >> 12) {
|
||||
|
@ -43,7 +43,7 @@ END_EVENT_TABLE()
|
||||
|
||||
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent)
|
||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(700, 800),
|
||||
wxTAB_TRAVERSAL, _("Sound"))
|
||||
wxTAB_TRAVERSAL, _("DSP LLE Debugger"))
|
||||
, m_CachedStepCounter(-1)
|
||||
{
|
||||
// notify wxAUI which frame to use
|
||||
@ -125,26 +125,29 @@ void DSPDebuggerLLE::OnClose(wxCloseEvent& event)
|
||||
|
||||
void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
|
||||
{
|
||||
if (DSPCore_GetState() == DSPCORE_STOP)
|
||||
return;
|
||||
|
||||
switch (event.GetId())
|
||||
{
|
||||
case ID_RUNTOOL:
|
||||
if (DSPCore_GetState() == DSPCORE_RUNNING)
|
||||
DSPCore_SetState(DSPCORE_STEPPING);
|
||||
else
|
||||
DSPCore_SetState(DSPCORE_RUNNING);
|
||||
break;
|
||||
case ID_RUNTOOL:
|
||||
if (DSPCore_GetState() == DSPCORE_RUNNING)
|
||||
DSPCore_SetState(DSPCORE_STEPPING);
|
||||
else
|
||||
DSPCore_SetState(DSPCORE_RUNNING);
|
||||
break;
|
||||
|
||||
case ID_STEPTOOL:
|
||||
if (DSPCore_GetState() == DSPCORE_STEPPING)
|
||||
{
|
||||
DSPCore_Step();
|
||||
Refresh();
|
||||
}
|
||||
break;
|
||||
case ID_STEPTOOL:
|
||||
if (DSPCore_GetState() == DSPCORE_STEPPING)
|
||||
{
|
||||
DSPCore_Step();
|
||||
Refresh();
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_SHOWPCTOOL:
|
||||
FocusOnPC();
|
||||
break;
|
||||
case ID_SHOWPCTOOL:
|
||||
FocusOnPC();
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateState();
|
||||
|
@ -202,24 +202,13 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
|
||||
DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
|
||||
}
|
||||
|
||||
void DllDebugger(void *_hParent, bool Show)
|
||||
void *DllDebugger(void *_hParent, bool Show)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (Show)
|
||||
{
|
||||
if (!m_DebuggerFrame)
|
||||
m_DebuggerFrame = new DSPDebuggerLLE((wxWindow *)_hParent);
|
||||
m_DebuggerFrame->Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_DebuggerFrame)
|
||||
{
|
||||
m_DebuggerFrame->Close();
|
||||
m_DebuggerFrame->Destroy();
|
||||
m_DebuggerFrame = NULL;
|
||||
}
|
||||
}
|
||||
m_DebuggerFrame = new DSPDebuggerLLE((wxWindow *)_hParent);
|
||||
return (void *)m_DebuggerFrame;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user