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:
Glenn Rice
2010-07-22 02:05:28 +00:00
parent fb36de2338
commit 3859a7dce2
33 changed files with 245 additions and 534 deletions

View File

@ -119,8 +119,9 @@ wxWindow* GetParentedWxWindow(HWND Parent)
#endif
void DllDebugger(void *_hParent, bool Show)
void *DllDebugger(void *_hParent, bool Show)
{
return NULL;
}

View File

@ -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) {

View File

@ -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();

View File

@ -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
}

View File

@ -107,8 +107,9 @@ wxWindow* GetParentedWxWindow(HWND Parent)
}
#endif
void DllDebugger(void *_hParent, bool Show)
void *DllDebugger(void *_hParent, bool Show)
{
return NULL;
}
#if defined(HAVE_WX) && HAVE_WX

View File

@ -33,7 +33,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxString &title = wxT("Video"));
const wxString &title = wxT("DX9 Debugger"));
virtual ~GFXDebuggerDX9();

View File

@ -28,7 +28,6 @@ GFXConfigDialogDX *m_ConfigFrame = NULL;
#if defined(HAVE_WX) && HAVE_WX
#include "Debugger/Debugger.h"
GFXDebuggerDX9 *m_DebuggerFrame = NULL;
#endif // HAVE_WX
#include "main.h"
@ -97,24 +96,12 @@ wxWindow* GetParentedWxWindow(HWND Parent)
}
#endif
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 GFXDebuggerDX9((wxWindow *)_hParent);
m_DebuggerFrame->Show();
}
else
{
if (m_DebuggerFrame)
{
m_DebuggerFrame->Close();
m_DebuggerFrame->Destroy();
m_DebuggerFrame = NULL;
}
}
return new GFXDebuggerDX9((wxWindow *)_hParent);
#else
return NULL;
#endif
}

View File

@ -33,7 +33,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxString &title = wxT("Video"));
const wxString &title = wxT("OpenGL Debugger"));
virtual ~GFXDebuggerOGL();

View File

@ -64,7 +64,6 @@ Make AA apply instantly during gameplay if possible
#include "GUI/ConfigDlg.h"
GFXConfigDialogOGL *m_ConfigFrame = NULL;
#include "Debugger/Debugger.h"
static GFXDebuggerOGL *m_DebuggerFrame = NULL;
#endif // HAVE_WX
#include "VideoConfig.h"
@ -152,24 +151,12 @@ wxWindow* GetParentedWxWindow(HWND Parent)
}
#endif
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 GFXDebuggerOGL((wxWindow *)_hParent);
m_DebuggerFrame->Show();
}
else
{
if (m_DebuggerFrame)
{
m_DebuggerFrame->Close();
m_DebuggerFrame->Destroy();
m_DebuggerFrame = NULL;
}
}
return new GFXDebuggerOGL((wxWindow *)_hParent);
#else
return NULL;
#endif
}

View File

@ -61,8 +61,9 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
LogManager::SetInstance((LogManager *)globals->logManager);
}
void DllDebugger(void *_hParent, bool Show)
void *DllDebugger(void *_hParent, bool Show)
{
return NULL;
}
void DllConfig(HWND _hParent)

View File

@ -152,7 +152,10 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
LogManager::SetInstance((LogManager *)globals->logManager);
}
void DllDebugger(void *_hParent, bool Show) {}
void *DllDebugger(void *_hParent, bool Show)
{
return NULL;
}
void DllConfig(HWND _hParent)
{

View File

@ -320,9 +320,9 @@ void DllConfig(HWND _hParent)
// input: a handle to the window that calls this function
// output: none
//
void DllDebugger(void *_hParent, bool Show)
void *DllDebugger(void *_hParent, bool Show)
{
// wut?
return NULL;
}
// ___________________________________________________________________________