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:
parent
fb36de2338
commit
3859a7dce2
|
@ -100,10 +100,9 @@ void CPlugin::Config(HWND _hwnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug: Open the Debugging window
|
// Debug: Open the Debugging window
|
||||||
void CPlugin::Debug(void *Parent, bool Show)
|
void *CPlugin::Debug(void *Parent, bool Show)
|
||||||
{
|
{
|
||||||
if (m_DllDebugger != NULL)
|
return m_DllDebugger(Parent, Show);
|
||||||
m_DllDebugger(Parent, Show);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlugin::SetGlobals(PLUGIN_GLOBALS* _pluginGlobals) {
|
void CPlugin::SetGlobals(PLUGIN_GLOBALS* _pluginGlobals) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Common
|
||||||
{
|
{
|
||||||
typedef void (__cdecl * TGetDllInfo)(PLUGIN_INFO*);
|
typedef void (__cdecl * TGetDllInfo)(PLUGIN_INFO*);
|
||||||
typedef void (__cdecl * TDllConfig)(HWND);
|
typedef void (__cdecl * TDllConfig)(HWND);
|
||||||
typedef void (__cdecl * TDllDebugger)(void *, bool);
|
typedef void* (__cdecl * TDllDebugger)(void *, bool);
|
||||||
typedef void (__cdecl * TSetDllGlobals)(PLUGIN_GLOBALS*);
|
typedef void (__cdecl * TSetDllGlobals)(PLUGIN_GLOBALS*);
|
||||||
typedef void (__cdecl * TInitialize)(void *);
|
typedef void (__cdecl * TInitialize)(void *);
|
||||||
typedef void (__cdecl * TShutdown)();
|
typedef void (__cdecl * TShutdown)();
|
||||||
|
@ -49,7 +49,7 @@ public:
|
||||||
|
|
||||||
void Config(HWND _hwnd);
|
void Config(HWND _hwnd);
|
||||||
void About(HWND _hwnd);
|
void About(HWND _hwnd);
|
||||||
void Debug(void *Parent, bool Show);
|
void *Debug(void *Parent, bool Show);
|
||||||
void DoState(unsigned char **ptr, int mode);
|
void DoState(unsigned char **ptr, int mode);
|
||||||
void EmuStateChange(PLUGIN_EMUSTATE newState);
|
void EmuStateChange(PLUGIN_EMUSTATE newState);
|
||||||
void Initialize(void *init);
|
void Initialize(void *init);
|
||||||
|
|
|
@ -212,11 +212,6 @@ void Stop() // - Hammertime!
|
||||||
|
|
||||||
WARN_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutting down ----");
|
WARN_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutting down ----");
|
||||||
|
|
||||||
// This must be done a while before freeing the dll to not crash wx around
|
|
||||||
// MSWWindowProc and DefWindowProc, will investigate further
|
|
||||||
Host_Message(AUDIO_DESTROY);
|
|
||||||
Host_Message(VIDEO_DESTROY);
|
|
||||||
|
|
||||||
Host_SetWaitCursor(true); // hourglass!
|
Host_SetWaitCursor(true); // hourglass!
|
||||||
if (PowerPC::GetState() == PowerPC::CPU_POWERDOWN)
|
if (PowerPC::GetState() == PowerPC::CPU_POWERDOWN)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -377,7 +377,6 @@ Common::PluginVideo *CPluginManager::GetVideo()
|
||||||
// the plugins in turn
|
// the plugins in turn
|
||||||
void CPluginManager::FreeVideo()
|
void CPluginManager::FreeVideo()
|
||||||
{
|
{
|
||||||
//Host_Message(VIDEO_DESTROY);
|
|
||||||
WARN_LOG(CONSOLE, "%s", Core::StopMessage(false, "Will unload video DLL").c_str());
|
WARN_LOG(CONSOLE, "%s", Core::StopMessage(false, "Will unload video DLL").c_str());
|
||||||
delete m_video;
|
delete m_video;
|
||||||
m_video = NULL;
|
m_video = NULL;
|
||||||
|
@ -385,7 +384,6 @@ void CPluginManager::FreeVideo()
|
||||||
|
|
||||||
void CPluginManager::FreeDSP()
|
void CPluginManager::FreeDSP()
|
||||||
{
|
{
|
||||||
//Host_Message(AUDIO_DESTROY);
|
|
||||||
WARN_LOG(CONSOLE, "%s", Core::StopMessage(false, "Will unload audio DLL").c_str());
|
WARN_LOG(CONSOLE, "%s", Core::StopMessage(false, "Will unload audio DLL").c_str());
|
||||||
delete m_dsp;
|
delete m_dsp;
|
||||||
m_dsp = NULL;
|
m_dsp = NULL;
|
||||||
|
@ -438,23 +436,24 @@ void CPluginManager::OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TY
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open debugging window. Type = Video or DSP. Show = Show or hide window.
|
// Open debugging window. Type = Video or DSP. Show = Show or hide window.
|
||||||
void CPluginManager::OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show)
|
void *CPluginManager::OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show)
|
||||||
{
|
{
|
||||||
if (! File::Exists((File::GetPluginsDirectory() + _rFilename).c_str()))
|
if (! File::Exists((File::GetPluginsDirectory() + _rFilename).c_str()))
|
||||||
{
|
{
|
||||||
PanicAlert("Can't find plugin %s", _rFilename);
|
PanicAlert("Can't find plugin %s", _rFilename);
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(Type)
|
switch(Type)
|
||||||
{
|
{
|
||||||
case PLUGIN_TYPE_VIDEO:
|
case PLUGIN_TYPE_VIDEO:
|
||||||
GetVideo()->Debug(_Parent, Show);
|
return GetVideo()->Debug(_Parent, Show);
|
||||||
break;
|
break;
|
||||||
case PLUGIN_TYPE_DSP:
|
case PLUGIN_TYPE_DSP:
|
||||||
GetDSP()->Debug(_Parent, Show);
|
return GetDSP()->Debug(_Parent, Show);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlert("Type %d debug not supported in plugin %s", Type, _rFilename);
|
PanicAlert("Type %d debug not supported in plugin %s", Type, _rFilename);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
void ShutdownVideoPlugin();
|
void ShutdownVideoPlugin();
|
||||||
void ScanForPlugins();
|
void ScanForPlugins();
|
||||||
void OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type);
|
void OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type);
|
||||||
void OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show);
|
void *OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show);
|
||||||
const CPluginInfos& GetPluginInfos() {return(m_PluginInfos);}
|
const CPluginInfos& GetPluginInfos() {return(m_PluginInfos);}
|
||||||
PLUGIN_GLOBALS* GetGlobals();
|
PLUGIN_GLOBALS* GetGlobals();
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
SDSP g_dsp;
|
SDSP g_dsp;
|
||||||
DSPBreakpoints dsp_breakpoints;
|
DSPBreakpoints dsp_breakpoints;
|
||||||
DSPCoreState core_state = DSPCORE_RUNNING;
|
DSPCoreState core_state = DSPCORE_STOP;
|
||||||
DSPEmitter *jit = NULL;
|
DSPEmitter *jit = NULL;
|
||||||
Common::Event step_event;
|
Common::Event step_event;
|
||||||
|
|
||||||
|
@ -136,11 +136,15 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename,
|
||||||
|
|
||||||
step_event.Init();
|
step_event.Init();
|
||||||
|
|
||||||
|
core_state = DSPCORE_RUNNING;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSPCore_Shutdown()
|
void DSPCore_Shutdown()
|
||||||
{
|
{
|
||||||
|
core_state = DSPCORE_STOP;
|
||||||
|
|
||||||
if(jit) {
|
if(jit) {
|
||||||
delete jit;
|
delete jit;
|
||||||
jit = NULL;
|
jit = NULL;
|
||||||
|
|
|
@ -251,8 +251,9 @@ void CompileCurrent();
|
||||||
|
|
||||||
enum DSPCoreState
|
enum DSPCoreState
|
||||||
{
|
{
|
||||||
DSPCORE_RUNNING = 0,
|
DSPCORE_STOP = 0,
|
||||||
DSPCORE_STEPPING = 1,
|
DSPCORE_RUNNING,
|
||||||
|
DSPCORE_STEPPING,
|
||||||
};
|
};
|
||||||
|
|
||||||
int DSPCore_RunCycles(int cycles);
|
int DSPCore_RunCycles(int cycles);
|
||||||
|
|
|
@ -48,17 +48,9 @@ class CCodeWindow
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
long style = wxTAB_TRAVERSAL,
|
||||||
const wxString& name = wxT("Dolphin-Debugger")
|
const wxString& name = wxT("Code")
|
||||||
);
|
);
|
||||||
/*
|
|
||||||
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent,
|
|
||||||
wxWindowID id = wxID_ANY,
|
|
||||||
const wxString& title = _T("Dolphin-Debugger"),
|
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
|
||||||
const wxSize& size = wxSize(400, 500),
|
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE);
|
|
||||||
*/
|
|
||||||
|
|
||||||
~CCodeWindow();
|
~CCodeWindow();
|
||||||
void Load();
|
void Load();
|
||||||
|
@ -122,13 +114,13 @@ class CCodeWindow
|
||||||
bool bAutomaticStart; bool bBootToPause;
|
bool bAutomaticStart; bool bBootToPause;
|
||||||
int iLogWindow;
|
int iLogWindow;
|
||||||
int iConsoleWindow;
|
int iConsoleWindow;
|
||||||
bool bCodeWindow; int iCodeWindow; bool bFloatCodeWindow;
|
bool bCodeWindow; int iCodeWindow;
|
||||||
bool bRegisterWindow; int iRegisterWindow; bool bFloatRegisterWindow;
|
bool bRegisterWindow; int iRegisterWindow;
|
||||||
bool bBreakpointWindow; int iBreakpointWindow; bool bFloatBreakpointWindow;
|
bool bBreakpointWindow; int iBreakpointWindow;
|
||||||
bool bMemoryWindow; int iMemoryWindow; bool bFloatMemoryWindow;
|
bool bMemoryWindow; int iMemoryWindow;
|
||||||
bool bJitWindow; int iJitWindow; bool bFloatJitWindow;
|
bool bJitWindow; int iJitWindow;
|
||||||
bool bSoundWindow; int iSoundWindow; bool bFloatSoundWindow;
|
bool bSoundWindow; int iSoundWindow;
|
||||||
bool bVideoWindow; int iVideoWindow; bool bFloatVideoWindow;
|
bool bVideoWindow; int iVideoWindow;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -107,15 +107,15 @@ void CCodeWindow::Load()
|
||||||
ini.Get(_Section.c_str(), "Sound", &iSoundWindow, 0);
|
ini.Get(_Section.c_str(), "Sound", &iSoundWindow, 0);
|
||||||
ini.Get(_Section.c_str(), "Video", &iVideoWindow, 0);
|
ini.Get(_Section.c_str(), "Video", &iVideoWindow, 0);
|
||||||
// Get floating setting
|
// Get floating setting
|
||||||
ini.Get("Float", "Log", &Parent->bFloatLogWindow, false);
|
ini.Get("Float", "Log", &Parent->bFloatWindow[0], false);
|
||||||
ini.Get("Float", "Console", &Parent->bFloatConsoleWindow, false);
|
ini.Get("Float", "Console", &Parent->bFloatWindow[1], false);
|
||||||
ini.Get("Float", "Code", &bFloatCodeWindow, false);
|
ini.Get("Float", "Code", &Parent->bFloatWindow[2], false);
|
||||||
ini.Get("Float", "Registers", &bFloatRegisterWindow, false);
|
ini.Get("Float", "Registers", &Parent->bFloatWindow[3], false);
|
||||||
ini.Get("Float", "Breakpoints", &bFloatBreakpointWindow, false);
|
ini.Get("Float", "Breakpoints", &Parent->bFloatWindow[4], false);
|
||||||
ini.Get("Float", "Memory", &bFloatMemoryWindow, false);
|
ini.Get("Float", "Memory", &Parent->bFloatWindow[5], false);
|
||||||
ini.Get("Float", "JIT", &bFloatJitWindow, false);
|
ini.Get("Float", "JIT", &Parent->bFloatWindow[6], false);
|
||||||
ini.Get("Float", "Sound", &bFloatSoundWindow, false);
|
ini.Get("Float", "Sound", &Parent->bFloatWindow[7], false);
|
||||||
ini.Get("Float", "Video", &bFloatVideoWindow, false);
|
ini.Get("Float", "Video", &Parent->bFloatWindow[8], false);
|
||||||
|
|
||||||
// Boot to pause or not
|
// Boot to pause or not
|
||||||
ini.Get("ShowOnStart", "AutomaticStart", &bAutomaticStart, false);
|
ini.Get("ShowOnStart", "AutomaticStart", &bAutomaticStart, false);
|
||||||
|
@ -470,7 +470,8 @@ void CCodeWindow::OnToggleWindow(wxCommandEvent& event)
|
||||||
void CCodeWindow::ToggleCodeWindow(bool bShow)
|
void CCodeWindow::ToggleCodeWindow(bool bShow)
|
||||||
{
|
{
|
||||||
if (bShow)
|
if (bShow)
|
||||||
Parent->DoAddPage(this, iCodeWindow, wxT("Code"), bFloatCodeWindow);
|
Parent->DoAddPage(this, iCodeWindow,
|
||||||
|
Parent->bFloatWindow[IDM_CODEWINDOW - IDM_LOGWINDOW]);
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(this);
|
Parent->DoRemovePage(this);
|
||||||
}
|
}
|
||||||
|
@ -483,7 +484,7 @@ void CCodeWindow::ToggleRegisterWindow(bool bShow)
|
||||||
if (!m_RegisterWindow)
|
if (!m_RegisterWindow)
|
||||||
m_RegisterWindow = new CRegisterWindow(Parent, IDM_REGISTERWINDOW);
|
m_RegisterWindow = new CRegisterWindow(Parent, IDM_REGISTERWINDOW);
|
||||||
Parent->DoAddPage(m_RegisterWindow, iRegisterWindow,
|
Parent->DoAddPage(m_RegisterWindow, iRegisterWindow,
|
||||||
wxT("Registers"), bFloatRegisterWindow);
|
Parent->bFloatWindow[IDM_REGISTERWINDOW - IDM_LOGWINDOW]);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_RegisterWindow);
|
Parent->DoRemovePage(m_RegisterWindow);
|
||||||
|
@ -497,7 +498,7 @@ void CCodeWindow::ToggleBreakPointWindow(bool bShow)
|
||||||
if (!m_BreakpointWindow)
|
if (!m_BreakpointWindow)
|
||||||
m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
|
m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINTWINDOW);
|
||||||
Parent->DoAddPage(m_BreakpointWindow, iBreakpointWindow,
|
Parent->DoAddPage(m_BreakpointWindow, iBreakpointWindow,
|
||||||
wxT("Breakpoints"), bFloatBreakpointWindow);
|
Parent->bFloatWindow[IDM_BREAKPOINTWINDOW - IDM_LOGWINDOW]);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_BreakpointWindow);
|
Parent->DoRemovePage(m_BreakpointWindow);
|
||||||
|
@ -510,7 +511,8 @@ void CCodeWindow::ToggleMemoryWindow(bool bShow)
|
||||||
{
|
{
|
||||||
if (!m_MemoryWindow)
|
if (!m_MemoryWindow)
|
||||||
m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
|
m_MemoryWindow = new CMemoryWindow(Parent, IDM_MEMORYWINDOW);
|
||||||
Parent->DoAddPage(m_MemoryWindow, iMemoryWindow, wxT("Memory"), bFloatMemoryWindow);
|
Parent->DoAddPage(m_MemoryWindow, iMemoryWindow,
|
||||||
|
Parent->bFloatWindow[IDM_MEMORYWINDOW - IDM_LOGWINDOW]);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_MemoryWindow);
|
Parent->DoRemovePage(m_MemoryWindow);
|
||||||
|
@ -523,7 +525,8 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
|
||||||
{
|
{
|
||||||
if (!m_JitWindow)
|
if (!m_JitWindow)
|
||||||
m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
|
m_JitWindow = new CJitWindow(Parent, IDM_JITWINDOW);
|
||||||
Parent->DoAddPage(m_JitWindow, iJitWindow, wxT("JIT"), bFloatJitWindow);
|
Parent->DoAddPage(m_JitWindow, iJitWindow,
|
||||||
|
Parent->bFloatWindow[IDM_JITWINDOW - IDM_LOGWINDOW]);
|
||||||
}
|
}
|
||||||
else // hide
|
else // hide
|
||||||
Parent->DoRemovePage(m_JitWindow);
|
Parent->DoRemovePage(m_JitWindow);
|
||||||
|
@ -537,50 +540,51 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
|
||||||
void CCodeWindow::ToggleDLLWindow(int Id, bool bShow)
|
void CCodeWindow::ToggleDLLWindow(int Id, bool bShow)
|
||||||
{
|
{
|
||||||
std::string DLLName;
|
std::string DLLName;
|
||||||
wxString Title;
|
|
||||||
int PluginType, i;
|
int PluginType, i;
|
||||||
bool bFloat;
|
bool bFloat;
|
||||||
|
wxPanel *Win;
|
||||||
|
|
||||||
switch(Id)
|
switch(Id)
|
||||||
{
|
{
|
||||||
case IDM_SOUNDWINDOW:
|
case IDM_SOUNDWINDOW:
|
||||||
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str();
|
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str();
|
||||||
PluginType = PLUGIN_TYPE_DSP;
|
PluginType = PLUGIN_TYPE_DSP;
|
||||||
Title = wxT("Sound");
|
|
||||||
i = iSoundWindow;
|
i = iSoundWindow;
|
||||||
bFloat = bFloatSoundWindow;
|
bFloat = Parent->bFloatWindow[IDM_SOUNDWINDOW - IDM_LOGWINDOW];
|
||||||
break;
|
break;
|
||||||
case IDM_VIDEOWINDOW:
|
case IDM_VIDEOWINDOW:
|
||||||
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str();
|
DLLName = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str();
|
||||||
PluginType = PLUGIN_TYPE_VIDEO;
|
PluginType = PLUGIN_TYPE_VIDEO;
|
||||||
Title = wxT("Video");
|
|
||||||
i = iVideoWindow;
|
i = iVideoWindow;
|
||||||
bFloat = bFloatVideoWindow;
|
bFloat = Parent->bFloatWindow[IDM_VIDEOWINDOW - IDM_LOGWINDOW];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlert("CCodeWindow::ToggleDLLWindow called with invalid Id");
|
PanicAlert("CCodeWindow::ToggleDLLWindow called with invalid Id");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMenuBar()->FindItem(Id)->Check(bShow);
|
|
||||||
|
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
// Show window
|
// Show window
|
||||||
CPluginManager::GetInstance().OpenDebug(Parent,
|
Win = (wxPanel *)CPluginManager::GetInstance().OpenDebug(Parent,
|
||||||
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
|
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
|
||||||
|
|
||||||
wxWindow* Win = Parent->GetWxWindow(Title);
|
|
||||||
if (Win)
|
if (Win)
|
||||||
{
|
{
|
||||||
|
Win->Show();
|
||||||
Win->SetId(Id);
|
Win->SetId(Id);
|
||||||
Parent->DoAddPage(Win, i, Title, bFloat);
|
Parent->DoAddPage(Win, i, bFloat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Parent->DoRemovePageId(Id, false, false);
|
Win = (wxPanel *)FindWindowById(Id);
|
||||||
CPluginManager::GetInstance().OpenDebug(Parent,
|
if (Win)
|
||||||
DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow);
|
{
|
||||||
|
Parent->DoRemovePageId(Id, false, false);
|
||||||
|
Win->Close();
|
||||||
|
Win->Destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
GetMenuBar()->FindItem(Id)->Check(bShow && !!Win);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,9 +67,9 @@ BEGIN_EVENT_TABLE(CJitWindow, wxPanel)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id,
|
CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
|
||||||
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
const wxSize& size, long style, const wxString& name)
|
||||||
: wxPanel(parent, id, pos, size, style)
|
: wxPanel(parent, id, pos, size, style, name)
|
||||||
{
|
{
|
||||||
the_jit_window = this;
|
the_jit_window = this;
|
||||||
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
|
@ -46,10 +46,10 @@ class CJitWindow : public wxPanel
|
||||||
public:
|
public:
|
||||||
CJitWindow(wxWindow* parent,
|
CJitWindow(wxWindow* parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString& title = _T("JIT block viewer"),
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxSize& size = wxSize(400, 500),
|
long style = wxTAB_TRAVERSAL,
|
||||||
long style = wxNO_BORDER);
|
const wxString& title = _T("JIT block viewer"));
|
||||||
~CJitWindow();
|
~CJitWindow();
|
||||||
|
|
||||||
static void ViewAddr(u32 em_address);
|
static void ViewAddr(u32 em_address);
|
||||||
|
|
|
@ -71,8 +71,8 @@ EVT_CHECKBOX(IDM_HEX , CMemoryWindow::onHex)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
||||||
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
const wxPoint& pos, const wxSize& size, long style, const wxString& name)
|
||||||
: wxPanel(parent, id, pos, size, style)
|
: wxPanel(parent, id, pos, size, style, name)
|
||||||
{
|
{
|
||||||
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
|
||||||
wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
|
@ -38,10 +38,10 @@ class CMemoryWindow
|
||||||
|
|
||||||
CMemoryWindow(wxWindow* parent,
|
CMemoryWindow(wxWindow* parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString& title = _T("Dolphin-Memory"),
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxPoint& pos = wxPoint(950, 100),
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxSize& size = wxSize(400, 500),
|
long style = wxNO_BORDER,
|
||||||
long style = wxNO_BORDER);
|
const wxString& name = _T("Memory"));
|
||||||
|
|
||||||
~CMemoryWindow();
|
~CMemoryWindow();
|
||||||
wxCheckBox* chk8;
|
wxCheckBox* chk8;
|
||||||
|
|
|
@ -266,15 +266,7 @@ EVT_MENU(IDM_ADD_PERSPECTIVE, CFrame::OnDropDownToolbarSelect)
|
||||||
EVT_MENU(IDM_TAB_SPLIT, CFrame::OnDropDownToolbarSelect)
|
EVT_MENU(IDM_TAB_SPLIT, CFrame::OnDropDownToolbarSelect)
|
||||||
EVT_MENU(IDM_NO_DOCKING, CFrame::OnDropDownToolbarSelect)
|
EVT_MENU(IDM_NO_DOCKING, CFrame::OnDropDownToolbarSelect)
|
||||||
// Drop down float
|
// Drop down float
|
||||||
EVT_MENU(IDM_FLOAT_LOGWINDOW, CFrame::OnFloatWindow)
|
EVT_MENU_RANGE(IDM_FLOAT_LOGWINDOW, IDM_FLOAT_VIDEOWINDOW, CFrame::OnFloatWindow)
|
||||||
EVT_MENU(IDM_FLOAT_CONSOLEWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_CODEWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_REGISTERWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_BREAKPOINTWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_MEMORYWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_JITWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_SOUNDWINDOW, CFrame::OnFloatWindow)
|
|
||||||
EVT_MENU(IDM_FLOAT_VIDEOWINDOW, CFrame::OnFloatWindow)
|
|
||||||
|
|
||||||
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
|
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
|
||||||
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
||||||
|
@ -350,7 +342,6 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
, m_MenuBar(NULL)
|
, m_MenuBar(NULL)
|
||||||
, bRenderToMain(false), bNoWiimoteMsg(false)
|
, bRenderToMain(false), bNoWiimoteMsg(false)
|
||||||
, m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
|
, m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
|
||||||
, bFloatLogWindow(false), bFloatConsoleWindow(false)
|
|
||||||
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
|
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
|
||||||
, m_RenderFrame(NULL), m_RenderParent(NULL)
|
, m_RenderFrame(NULL), m_RenderParent(NULL)
|
||||||
, m_LogWindow(NULL), UseDebugger(_UseDebugger)
|
, m_LogWindow(NULL), UseDebugger(_UseDebugger)
|
||||||
|
@ -360,6 +351,9 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
, m_timer(this)
|
, m_timer(this)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i <= IDM_VIDEOWINDOW - IDM_LOGWINDOW; i++)
|
||||||
|
bFloatWindow[i] = false;
|
||||||
|
|
||||||
if (ShowLogWindow) SConfig::GetInstance().m_InterfaceLogWindow = true;
|
if (ShowLogWindow) SConfig::GetInstance().m_InterfaceLogWindow = true;
|
||||||
|
|
||||||
// Give it a console early to show potential messages from this onward
|
// Give it a console early to show potential messages from this onward
|
||||||
|
@ -443,7 +437,7 @@ CFrame::CFrame(wxFrame* parent,
|
||||||
{
|
{
|
||||||
IniFile ini; int winpos;
|
IniFile ini; int winpos;
|
||||||
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||||
ini.Get("LogWindow", "pos", &winpos, 2);
|
ini.Get("LogWindow", "pos", &winpos, wxAUI_DOCK_RIGHT);
|
||||||
|
|
||||||
m_Mgr->GetPane(wxT("Pane 0")).Show().PaneBorder(false).CaptionVisible(false).Layer(0).Center();
|
m_Mgr->GetPane(wxT("Pane 0")).Show().PaneBorder(false).CaptionVisible(false).Layer(0).Center();
|
||||||
m_Mgr->GetPane(wxT("Pane 1")).Hide().PaneBorder(false).CaptionVisible(true).Layer(0)
|
m_Mgr->GetPane(wxT("Pane 1")).Hide().PaneBorder(false).CaptionVisible(true).Layer(0)
|
||||||
|
@ -701,14 +695,6 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||||
DoStop();
|
DoStop();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case AUDIO_DESTROY:
|
|
||||||
if (g_pCodeWindow)
|
|
||||||
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VIDEO_DESTROY:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -917,12 +903,6 @@ wxFrame * CFrame::CreateParentFrame(wxWindowID Id, const wxString& Title, wxWind
|
||||||
return Frame;
|
return Frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPanel* CFrame::CreateEmptyPanel(wxWindowID Id)
|
|
||||||
{
|
|
||||||
wxPanel* Panel = new wxPanel(this, Id);
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxAuiNotebook* CFrame::CreateEmptyNotebook()
|
wxAuiNotebook* CFrame::CreateEmptyNotebook()
|
||||||
{
|
{
|
||||||
wxAuiNotebook* NB = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, NOTEBOOK_STYLE);
|
wxAuiNotebook* NB = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, NOTEBOOK_STYLE);
|
||||||
|
|
|
@ -147,20 +147,11 @@ class CFrame : public CRenderFrame
|
||||||
wxAuiToolBar *m_ToolBar, *m_ToolBarDebug, *m_ToolBarAui;
|
wxAuiToolBar *m_ToolBar, *m_ToolBarDebug, *m_ToolBarAui;
|
||||||
long NOTEBOOK_STYLE, TOOLBAR_STYLE;
|
long NOTEBOOK_STYLE, TOOLBAR_STYLE;
|
||||||
int iLeftWidth[2], iMidWidth[2];
|
int iLeftWidth[2], iMidWidth[2];
|
||||||
bool bFloatLogWindow;
|
bool bFloatWindow[IDM_VIDEOWINDOW - IDM_LOGWINDOW + 1];
|
||||||
bool bFloatConsoleWindow;
|
|
||||||
|
|
||||||
// Utility
|
// Utility
|
||||||
wxWindow * GetWxWindow(wxString);
|
wxWindow * GetNotebookPageFromId(wxWindowID Id);
|
||||||
#ifdef _WIN32
|
|
||||||
wxWindow * GetWxWindowHwnd(HWND);
|
|
||||||
#endif
|
|
||||||
wxWindow * GetFloatingPage(int Id);
|
|
||||||
wxWindow * GetNootebookPage(wxString);
|
|
||||||
wxWindow * GetNootebookPageFromId(wxWindowID Id);
|
|
||||||
wxAuiNotebook * GetNotebookFromId(u32);
|
wxAuiNotebook * GetNotebookFromId(u32);
|
||||||
wxWindowID WindowParentIdFromChildId(int Id);
|
|
||||||
wxString WindowNameFromId(int Id);
|
|
||||||
int GetNotebookCount();
|
int GetNotebookCount();
|
||||||
int Limit(int,int,int);
|
int Limit(int,int,int);
|
||||||
int PercentageToPixels(int,int);
|
int PercentageToPixels(int,int);
|
||||||
|
@ -175,12 +166,12 @@ class CFrame : public CRenderFrame
|
||||||
void OnFloatWindow(wxCommandEvent& event);
|
void OnFloatWindow(wxCommandEvent& event);
|
||||||
void ToggleFloatWindow(int Id);
|
void ToggleFloatWindow(int Id);
|
||||||
void OnTab(wxAuiNotebookEvent& event);
|
void OnTab(wxAuiNotebookEvent& event);
|
||||||
int GetNootebookAffiliation(wxString Name);
|
int GetNotebookAffiliation(wxWindowID Id);
|
||||||
void ClosePages();
|
void ClosePages();
|
||||||
void ShowAllNotebooks(bool Window = false);
|
void ShowAllNotebooks(bool Window = false);
|
||||||
void HideAllNotebooks(bool Window = false);
|
void HideAllNotebooks(bool Window = false);
|
||||||
void CloseAllNotebooks();
|
void CloseAllNotebooks();
|
||||||
void DoAddPage(wxWindow *, int, wxString, bool);
|
void DoAddPage(wxWindow *, int, bool);
|
||||||
void DoRemovePage(wxWindow *, bool Hide = true);
|
void DoRemovePage(wxWindow *, bool Hide = true);
|
||||||
void DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy);
|
void DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy);
|
||||||
void TogglePane();
|
void TogglePane();
|
||||||
|
@ -276,7 +267,6 @@ class CFrame : public CRenderFrame
|
||||||
void PopulateToolbarAui(wxAuiToolBar* toolBar);
|
void PopulateToolbarAui(wxAuiToolBar* toolBar);
|
||||||
void RecreateToolbar();
|
void RecreateToolbar();
|
||||||
void CreateMenu();
|
void CreateMenu();
|
||||||
wxPanel *CreateEmptyPanel(wxWindowID Id = wxID_ANY);
|
|
||||||
wxAuiNotebook *CreateEmptyNotebook();
|
wxAuiNotebook *CreateEmptyNotebook();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -66,8 +66,6 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
|
||||||
if ((nb->GetPageText(0).IsSameAs(wxT("Log")) || nb->GetPageText(0).IsSameAs(wxT("Console"))))
|
if ((nb->GetPageText(0).IsSameAs(wxT("Log")) || nb->GetPageText(0).IsSameAs(wxT("Console"))))
|
||||||
{
|
{
|
||||||
// Closing a pane containing the logwindow or a console closes both
|
// Closing a pane containing the logwindow or a console closes both
|
||||||
GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(false);
|
|
||||||
GetMenuBar()->FindItem(IDM_LOGWINDOW)->Check(false);
|
|
||||||
SConfig::GetInstance().m_InterfaceConsole = false;
|
SConfig::GetInstance().m_InterfaceConsole = false;
|
||||||
SConfig::GetInstance().m_InterfaceLogWindow = false;
|
SConfig::GetInstance().m_InterfaceLogWindow = false;
|
||||||
ToggleConsole(false);
|
ToggleConsole(false);
|
||||||
|
@ -101,7 +99,7 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (!m_LogWindow) m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
if (!m_LogWindow) m_LogWindow = new CLogWindow(this, IDM_LOGWINDOW);
|
||||||
DoAddPage(m_LogWindow, i, wxT("Log"), bFloatLogWindow);
|
DoAddPage(m_LogWindow, i, bFloatWindow[0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DoRemovePage(m_LogWindow, bShow);
|
DoRemovePage(m_LogWindow, bShow);
|
||||||
|
@ -121,33 +119,30 @@ void CFrame::OnToggleConsole(wxCommandEvent& event)
|
||||||
void CFrame::ToggleConsole(bool bShow, int i)
|
void CFrame::ToggleConsole(bool bShow, int i)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
|
||||||
|
|
||||||
GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(bShow);
|
GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(bShow);
|
||||||
|
|
||||||
if (bShow)
|
if (bShow)
|
||||||
{
|
{
|
||||||
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
|
||||||
|
|
||||||
// If the window and its page already exist, there's a bug :p
|
|
||||||
if (GetNotebookFromId(i)->GetPageIndex(GetWxWindowHwnd(GetConsoleWindow())) != wxNOT_FOUND)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// If the console doesn't exist, we create it
|
// If the console doesn't exist, we create it
|
||||||
if (!GetConsoleWindow())
|
if (!GetConsoleWindow())
|
||||||
|
{
|
||||||
|
ConsoleListener *Console = LogManager::GetInstance()->getConsoleListener();
|
||||||
Console->Open();
|
Console->Open();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ShowWindow(GetConsoleWindow(), SW_SHOW); // WIN32
|
ShowWindow(GetConsoleWindow(), SW_SHOW);
|
||||||
|
|
||||||
// We retrieve our wxWindow to access our console + its parent (which is the page)
|
// Create the parent window if it doesn't exist
|
||||||
wxWindow *ConsoleWin = GetWxWindowHwnd(GetConsoleWindow());
|
|
||||||
wxPanel *ConsoleParent = (wxPanel*)FindWindowById(IDM_CONSOLEWINDOW);
|
wxPanel *ConsoleParent = (wxPanel*)FindWindowById(IDM_CONSOLEWINDOW);
|
||||||
|
if (!ConsoleParent) ConsoleParent = new wxPanel(this, IDM_CONSOLEWINDOW,
|
||||||
|
wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _("Console"));
|
||||||
|
|
||||||
// Create the parent window if it doesn't exist, and put the console in it
|
wxWindow *ConsoleWin = new wxWindow();
|
||||||
if (!ConsoleParent) ConsoleParent = CreateEmptyPanel(IDM_CONSOLEWINDOW);
|
ConsoleWin->SetHWND((WXHWND)GetConsoleWindow());
|
||||||
|
ConsoleWin->AdoptAttributesFromHWND();
|
||||||
ConsoleWin->Reparent(ConsoleParent);
|
ConsoleWin->Reparent(ConsoleParent);
|
||||||
|
|
||||||
DoAddPage(ConsoleParent, i, wxT("Console"), bFloatConsoleWindow);
|
DoAddPage(ConsoleParent, i, bFloatWindow[1]);
|
||||||
}
|
}
|
||||||
else // Hide
|
else // Hide
|
||||||
{
|
{
|
||||||
|
@ -191,24 +186,24 @@ void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
|
||||||
AddRemoveBlankPage();
|
AddRemoveBlankPage();
|
||||||
|
|
||||||
// Update the notebook affiliation
|
// Update the notebook affiliation
|
||||||
if(GetNootebookAffiliation(wxT("Log")) >= 0)
|
if(GetNotebookAffiliation(IDM_LOGWINDOW) >= 0)
|
||||||
g_pCodeWindow->iLogWindow = GetNootebookAffiliation(wxT("Log"));
|
g_pCodeWindow->iLogWindow = GetNotebookAffiliation(IDM_LOGWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Console")) >= 0)
|
if(GetNotebookAffiliation(IDM_CONSOLEWINDOW) >= 0)
|
||||||
g_pCodeWindow->iConsoleWindow = GetNootebookAffiliation(wxT("Console"));
|
g_pCodeWindow->iConsoleWindow = GetNotebookAffiliation(IDM_CONSOLEWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Code")) >= 0)
|
if(GetNotebookAffiliation(IDM_CODEWINDOW) >= 0)
|
||||||
g_pCodeWindow->iCodeWindow = GetNootebookAffiliation(wxT("Code"));
|
g_pCodeWindow->iCodeWindow = GetNotebookAffiliation(IDM_CODEWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Registers")) >= 0)
|
if(GetNotebookAffiliation(IDM_REGISTERWINDOW) >= 0)
|
||||||
g_pCodeWindow->iRegisterWindow = GetNootebookAffiliation(wxT("Registers"));
|
g_pCodeWindow->iRegisterWindow = GetNotebookAffiliation(IDM_REGISTERWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Breakpoints")) >= 0)
|
if(GetNotebookAffiliation(IDM_BREAKPOINTWINDOW) >= 0)
|
||||||
g_pCodeWindow->iBreakpointWindow = GetNootebookAffiliation(wxT("Breakpoints"));
|
g_pCodeWindow->iBreakpointWindow = GetNotebookAffiliation(IDM_BREAKPOINTWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("JIT")) >= 0)
|
if(GetNotebookAffiliation(IDM_JITWINDOW) >= 0)
|
||||||
g_pCodeWindow->iJitWindow = GetNootebookAffiliation(wxT("JIT"));
|
g_pCodeWindow->iJitWindow = GetNotebookAffiliation(IDM_JITWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Memory")) >= 0)
|
if(GetNotebookAffiliation(IDM_MEMORYWINDOW) >= 0)
|
||||||
g_pCodeWindow->iMemoryWindow = GetNootebookAffiliation(wxT("Memory"));
|
g_pCodeWindow->iMemoryWindow = GetNotebookAffiliation(IDM_MEMORYWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Sound")) >= 0)
|
if(GetNotebookAffiliation(IDM_SOUNDWINDOW) >= 0)
|
||||||
g_pCodeWindow->iSoundWindow = GetNootebookAffiliation(wxT("Sound"));
|
g_pCodeWindow->iSoundWindow = GetNotebookAffiliation(IDM_SOUNDWINDOW);
|
||||||
if(GetNootebookAffiliation(wxT("Video")) >= 0)
|
if(GetNotebookAffiliation(IDM_VIDEOWINDOW) >= 0)
|
||||||
g_pCodeWindow->iVideoWindow = GetNootebookAffiliation(wxT("Video"));
|
g_pCodeWindow->iVideoWindow = GetNotebookAffiliation(IDM_VIDEOWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
||||||
|
@ -218,21 +213,21 @@ void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
|
||||||
|
|
||||||
wxAuiNotebook* Ctrl = (wxAuiNotebook*)event.GetEventObject();
|
wxAuiNotebook* Ctrl = (wxAuiNotebook*)event.GetEventObject();
|
||||||
|
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Log")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_LOGWINDOW)
|
||||||
ToggleLogWindow(false);
|
ToggleLogWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Console")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_CONSOLEWINDOW)
|
||||||
ToggleConsole(false);
|
ToggleConsole(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Registers")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_REGISTERWINDOW)
|
||||||
g_pCodeWindow->ToggleRegisterWindow(false);
|
g_pCodeWindow->ToggleRegisterWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Breakpoints")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_BREAKPOINTWINDOW)
|
||||||
g_pCodeWindow->ToggleBreakPointWindow(false);
|
g_pCodeWindow->ToggleBreakPointWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("JIT")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_JITWINDOW)
|
||||||
g_pCodeWindow->ToggleJitWindow(false);
|
g_pCodeWindow->ToggleJitWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Memory")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_MEMORYWINDOW)
|
||||||
g_pCodeWindow->ToggleMemoryWindow(false);
|
g_pCodeWindow->ToggleMemoryWindow(false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Sound")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_SOUNDWINDOW)
|
||||||
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
||||||
if (Ctrl->GetPageText(event.GetSelection()).IsSameAs(wxT("Video")))
|
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_VIDEOWINDOW)
|
||||||
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false);
|
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,138 +238,17 @@ void CFrame::OnFloatWindow(wxCommandEvent& event)
|
||||||
|
|
||||||
void CFrame::ToggleFloatWindow(int Id)
|
void CFrame::ToggleFloatWindow(int Id)
|
||||||
{
|
{
|
||||||
switch(Id)
|
wxWindowID WinId = Id - IDM_FLOAT_LOGWINDOW + IDM_LOGWINDOW;
|
||||||
|
if (GetNotebookPageFromId(WinId))
|
||||||
{
|
{
|
||||||
case IDM_FLOAT_LOGWINDOW:
|
DoFloatNotebookPage(WinId);
|
||||||
if (GetNootebookPageFromId(IDM_LOGWINDOW))
|
bFloatWindow[WinId - IDM_LOGWINDOW] = true;
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_LOGWINDOW);
|
|
||||||
bFloatLogWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_CONSOLEWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_CONSOLEWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_CONSOLEWINDOW);
|
|
||||||
bFloatConsoleWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
switch(Id)
|
else
|
||||||
{
|
{
|
||||||
case IDM_FLOAT_LOGWINDOW:
|
if (FindWindowById(WinId))
|
||||||
if (FindWindowById(IDM_LOGWINDOW))
|
DoUnfloatPage(WinId - IDM_LOGWINDOW + IDM_LOGWINDOW_PARENT);
|
||||||
DoUnfloatPage(IDM_LOGWINDOW_PARENT);
|
bFloatWindow[WinId - IDM_LOGWINDOW] = false;
|
||||||
bFloatLogWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_CONSOLEWINDOW:
|
|
||||||
if (FindWindowById(IDM_CONSOLEWINDOW))
|
|
||||||
DoUnfloatPage(IDM_CONSOLEWINDOW_PARENT);
|
|
||||||
bFloatConsoleWindow = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!g_pCodeWindow)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch(Id)
|
|
||||||
{
|
|
||||||
case IDM_FLOAT_CODEWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_CODEWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_CODEWINDOW);
|
|
||||||
g_pCodeWindow->bFloatCodeWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_REGISTERWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_REGISTERWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_REGISTERWINDOW);
|
|
||||||
g_pCodeWindow->bFloatRegisterWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_BREAKPOINTWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_BREAKPOINTWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_BREAKPOINTWINDOW);
|
|
||||||
g_pCodeWindow->bFloatBreakpointWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_MEMORYWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_MEMORYWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_MEMORYWINDOW);
|
|
||||||
g_pCodeWindow->bFloatMemoryWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_JITWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_JITWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_JITWINDOW);
|
|
||||||
g_pCodeWindow->bFloatJitWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_SOUNDWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_SOUNDWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_SOUNDWINDOW);
|
|
||||||
g_pCodeWindow->bFloatSoundWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_VIDEOWINDOW:
|
|
||||||
if (GetNootebookPageFromId(IDM_VIDEOWINDOW))
|
|
||||||
{
|
|
||||||
DoFloatNotebookPage(IDM_VIDEOWINDOW);
|
|
||||||
g_pCodeWindow->bFloatVideoWindow = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch(Id)
|
|
||||||
{
|
|
||||||
case IDM_FLOAT_CODEWINDOW:
|
|
||||||
if (FindWindowById(IDM_CODEWINDOW))
|
|
||||||
DoUnfloatPage(IDM_CODEWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatCodeWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_REGISTERWINDOW:
|
|
||||||
if (FindWindowById(IDM_REGISTERWINDOW))
|
|
||||||
DoUnfloatPage(IDM_REGISTERWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatRegisterWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_BREAKPOINTWINDOW:
|
|
||||||
if (FindWindowById(IDM_BREAKPOINTWINDOW))
|
|
||||||
DoUnfloatPage(IDM_BREAKPOINTWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatBreakpointWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_MEMORYWINDOW:
|
|
||||||
if (FindWindowById(IDM_MEMORYWINDOW))
|
|
||||||
DoUnfloatPage(IDM_MEMORYWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatMemoryWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_JITWINDOW:
|
|
||||||
if (FindWindowById(IDM_JITWINDOW))
|
|
||||||
DoUnfloatPage(IDM_JITWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatJitWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_SOUNDWINDOW:
|
|
||||||
if (FindWindowById(IDM_SOUNDWINDOW))
|
|
||||||
DoUnfloatPage(IDM_SOUNDWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatSoundWindow = false;
|
|
||||||
break;
|
|
||||||
case IDM_FLOAT_VIDEOWINDOW:
|
|
||||||
if (FindWindowById(IDM_VIDEOWINDOW))
|
|
||||||
DoUnfloatPage(IDM_VIDEOWINDOW_PARENT);
|
|
||||||
g_pCodeWindow->bFloatVideoWindow = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,43 +265,17 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
|
||||||
MenuPopup->Append(Item);
|
MenuPopup->Append(Item);
|
||||||
Item->Enable(false);
|
Item->Enable(false);
|
||||||
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_LOGWINDOW,
|
for (int i = IDM_LOGWINDOW; i <= IDM_VIDEOWINDOW; i++)
|
||||||
WindowNameFromId(IDM_LOGWINDOW), wxT(""), wxITEM_CHECK);
|
{
|
||||||
MenuPopup->Append(Item);
|
wxWindow *Win = FindWindowById(i);
|
||||||
Item->Check(!!FindWindowById(IDM_LOGWINDOW_PARENT));
|
if (Win)
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_CONSOLEWINDOW,
|
{
|
||||||
WindowNameFromId(IDM_CONSOLEWINDOW), wxT(""), wxITEM_CHECK);
|
Item = new wxMenuItem(MenuPopup, i + IDM_FLOAT_LOGWINDOW - IDM_LOGWINDOW,
|
||||||
MenuPopup->Append(Item);
|
Win->GetName(), wxT(""), wxITEM_CHECK);
|
||||||
Item->Check(!!FindWindowById(IDM_CONSOLEWINDOW_PARENT));
|
MenuPopup->Append(Item);
|
||||||
MenuPopup->Append(new wxMenuItem(MenuPopup));
|
Item->Check(!!FindWindowById(i + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW));
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_CODEWINDOW,
|
}
|
||||||
WindowNameFromId(IDM_CODEWINDOW), wxT(""), wxITEM_CHECK);
|
}
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_CODEWINDOW_PARENT));
|
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_REGISTERWINDOW,
|
|
||||||
WindowNameFromId(IDM_REGISTERWINDOW), wxT(""), wxITEM_CHECK);
|
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_REGISTERWINDOW_PARENT));
|
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_BREAKPOINTWINDOW,
|
|
||||||
WindowNameFromId(IDM_BREAKPOINTWINDOW), wxT(""), wxITEM_CHECK);
|
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_BREAKPOINTWINDOW_PARENT));
|
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_MEMORYWINDOW,
|
|
||||||
WindowNameFromId(IDM_MEMORYWINDOW), wxT(""), wxITEM_CHECK);
|
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_MEMORYWINDOW_PARENT));
|
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_JITWINDOW,
|
|
||||||
WindowNameFromId(IDM_JITWINDOW), wxT(""), wxITEM_CHECK);
|
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_JITWINDOW_PARENT));
|
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_SOUNDWINDOW,
|
|
||||||
WindowNameFromId(IDM_SOUNDWINDOW), wxT(""), wxITEM_CHECK);
|
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_SOUNDWINDOW_PARENT));
|
|
||||||
Item = new wxMenuItem(MenuPopup, IDM_FLOAT_VIDEOWINDOW,
|
|
||||||
WindowNameFromId(IDM_VIDEOWINDOW), wxT(""), wxITEM_CHECK);
|
|
||||||
MenuPopup->Append(Item);
|
|
||||||
Item->Check(!!FindWindowById(IDM_VIDEOWINDOW_PARENT));
|
|
||||||
|
|
||||||
// Line up our menu with the cursor
|
// Line up our menu with the cursor
|
||||||
wxPoint Pt = ::wxGetMousePosition();
|
wxPoint Pt = ::wxGetMousePosition();
|
||||||
|
@ -467,11 +315,11 @@ void CFrame::DoRemovePage(wxWindow * Win, bool _Hide)
|
||||||
{
|
{
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
if (Win->GetId() > 0 && FindWindowById(WindowParentIdFromChildId(Win->GetId())))
|
if (Win->GetId() > 0 && FindWindowById(Win->GetId() + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW))
|
||||||
{
|
{
|
||||||
Win->Reparent(this);
|
Win->Reparent(this);
|
||||||
Win->Hide();
|
Win->Hide();
|
||||||
FindWindowById(WindowParentIdFromChildId(Win->GetId()))->Destroy();
|
FindWindowById(Win->GetId() + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW)->Destroy();
|
||||||
WARN_LOG(CONSOLE, "Floating window %i closed", Win->GetId());
|
WARN_LOG(CONSOLE, "Floating window %i closed", Win->GetId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -496,7 +344,7 @@ void CFrame::DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy)
|
||||||
if (!Win)
|
if (!Win)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxWindow *Parent = FindWindowById(WindowParentIdFromChildId(Id));
|
wxWindow *Parent = FindWindowById(Id + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW);
|
||||||
|
|
||||||
if (Parent)
|
if (Parent)
|
||||||
{
|
{
|
||||||
|
@ -526,16 +374,16 @@ void CFrame::DoRemovePageId(wxWindowID Id, bool bHide, bool bDestroy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoAddPage(wxWindow * Win, int i, wxString Name, bool Float)
|
void CFrame::DoAddPage(wxWindow * Win, int i, bool Float)
|
||||||
{
|
{
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
if (GetNotebookCount() == 0) return;
|
if (GetNotebookCount() == 0) return;
|
||||||
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
if (i < 0 || i > GetNotebookCount()-1) i = 0;
|
||||||
if (Win && GetNotebookFromId(i)->GetPageIndex(Win) != wxNOT_FOUND) return;
|
if (Win && GetNotebookFromId(i)->GetPageIndex(Win) != wxNOT_FOUND) return;
|
||||||
if (!Float)
|
if (!Float)
|
||||||
GetNotebookFromId(i)->AddPage(Win, Name, true, aNormalFile );
|
GetNotebookFromId(i)->AddPage(Win, Win->GetName(), true, aNormalFile );
|
||||||
else
|
else
|
||||||
CreateParentFrame(WindowParentIdFromChildId(Win->GetId()), WindowNameFromId(Win->GetId()), Win);
|
CreateParentFrame(Win->GetId() + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW, Win->GetName(), Win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::DoUnfloatPage(int Id)
|
void CFrame::DoUnfloatPage(int Id)
|
||||||
|
@ -545,7 +393,7 @@ void CFrame::DoUnfloatPage(int Id)
|
||||||
|
|
||||||
wxWindow * Child = Win->GetWindowChildren().Item(0)->GetData();
|
wxWindow * Child = Win->GetWindowChildren().Item(0)->GetData();
|
||||||
Child->Reparent(this);
|
Child->Reparent(this);
|
||||||
DoAddPage(Child, 0, Win->GetTitle(), false);
|
DoAddPage(Child, 0, false);
|
||||||
Win->Destroy();
|
Win->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,7 +410,7 @@ void CFrame::OnFloatingPageSize(wxSizeEvent& event)
|
||||||
|
|
||||||
void CFrame::DoFloatNotebookPage(wxWindowID Id)
|
void CFrame::DoFloatNotebookPage(wxWindowID Id)
|
||||||
{
|
{
|
||||||
wxFrame * Win = (wxFrame*)this->FindWindowById(Id);
|
wxPanel * Win = (wxPanel*)this->FindWindowById(Id);
|
||||||
if (!Win) return;
|
if (!Win) return;
|
||||||
|
|
||||||
for (int i = 0; i < GetNotebookCount(); i++)
|
for (int i = 0; i < GetNotebookCount(); i++)
|
||||||
|
@ -571,7 +419,7 @@ void CFrame::DoFloatNotebookPage(wxWindowID Id)
|
||||||
{
|
{
|
||||||
GetNotebookFromId(i)->RemovePage(GetNotebookFromId(i)->GetPageIndex(Win));
|
GetNotebookFromId(i)->RemovePage(GetNotebookFromId(i)->GetPageIndex(Win));
|
||||||
// Reparent to avoid destruction if the notebook is closed and destroyed
|
// Reparent to avoid destruction if the notebook is closed and destroyed
|
||||||
CreateParentFrame(WindowParentIdFromChildId(Win->GetId()), WindowNameFromId(Win->GetId()), Win);
|
CreateParentFrame(Win->GetId() + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW, Win->GetName(), Win);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1120,63 +968,7 @@ int CFrame::PixelsToPercentage(int Pixels, int Total)
|
||||||
return Percentage;
|
return Percentage;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
wxWindow * CFrame::GetNotebookPageFromId(wxWindowID Id)
|
||||||
wxWindow * CFrame::GetWxWindowHwnd(HWND hWnd)
|
|
||||||
{
|
|
||||||
wxWindow * Win = new wxWindow();
|
|
||||||
Win->SetHWND((WXHWND)hWnd);
|
|
||||||
Win->AdoptAttributesFromHWND();
|
|
||||||
return Win;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxWindow * CFrame::GetWxWindow(wxString Name)
|
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
|
||||||
HWND hWnd = ::FindWindow(NULL, Name.c_str());
|
|
||||||
if (hWnd)
|
|
||||||
{
|
|
||||||
wxWindow * Win = new wxWindow();
|
|
||||||
Win->SetHWND((WXHWND)hWnd);
|
|
||||||
Win->AdoptAttributesFromHWND();
|
|
||||||
return Win;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if (FindWindowByName(Name))
|
|
||||||
return FindWindowByName(Name);
|
|
||||||
else if (FindWindowByLabel(Name))
|
|
||||||
return FindWindowByLabel(Name);
|
|
||||||
else if (GetNootebookPage(Name))
|
|
||||||
return GetNootebookPage(Name);
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow * CFrame::GetFloatingPage(int Id)
|
|
||||||
{
|
|
||||||
if (this->FindWindowById(Id))
|
|
||||||
return this->FindWindowById(Id);
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow * CFrame::GetNootebookPage(wxString Name)
|
|
||||||
{
|
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
|
||||||
{
|
|
||||||
if (!m_Mgr->GetAllPanes().Item(i).window->IsKindOf(CLASSINFO(wxAuiNotebook))) continue;
|
|
||||||
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window;
|
|
||||||
for(u32 j = 0; j < NB->GetPageCount(); j++)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (NB->GetPageText(j).IsSameAs(Name)) return NB->GetPage(j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxWindow * CFrame::GetNootebookPageFromId(wxWindowID Id)
|
|
||||||
{
|
{
|
||||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
{
|
{
|
||||||
|
@ -1200,11 +992,11 @@ void CFrame::AddRemoveBlankPage()
|
||||||
{
|
{
|
||||||
if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1) NB->DeletePage(j);
|
if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1) NB->DeletePage(j);
|
||||||
}
|
}
|
||||||
if (NB->GetPageCount() == 0) NB->AddPage(CreateEmptyPanel(), wxT("<>"), true);
|
if (NB->GetPageCount() == 0) NB->AddPage(new wxPanel(this, wxID_ANY), wxT("<>"), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CFrame::GetNootebookAffiliation(wxString Name)
|
int CFrame::GetNotebookAffiliation(wxWindowID Id)
|
||||||
{
|
{
|
||||||
for (u32 i = 0, j = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
for (u32 i = 0, j = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||||
{
|
{
|
||||||
|
@ -1212,47 +1004,13 @@ int CFrame::GetNootebookAffiliation(wxString Name)
|
||||||
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window;
|
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window;
|
||||||
for(u32 k = 0; k < NB->GetPageCount(); k++)
|
for(u32 k = 0; k < NB->GetPageCount(); k++)
|
||||||
{
|
{
|
||||||
if (NB->GetPageText(k).IsSameAs(Name)) return j;
|
if (NB->GetPage(k)->GetId() == Id) return j;
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindowID CFrame::WindowParentIdFromChildId(int Id)
|
|
||||||
{
|
|
||||||
switch(Id)
|
|
||||||
{
|
|
||||||
case IDM_LOGWINDOW: return IDM_LOGWINDOW_PARENT;
|
|
||||||
case IDM_CONSOLEWINDOW: return IDM_CONSOLEWINDOW_PARENT;
|
|
||||||
case IDM_CODEWINDOW: return IDM_CODEWINDOW_PARENT;
|
|
||||||
case IDM_REGISTERWINDOW: return IDM_REGISTERWINDOW_PARENT;
|
|
||||||
case IDM_BREAKPOINTWINDOW: return IDM_BREAKPOINTWINDOW_PARENT;
|
|
||||||
case IDM_MEMORYWINDOW: return IDM_MEMORYWINDOW_PARENT;
|
|
||||||
case IDM_JITWINDOW: return IDM_JITWINDOW_PARENT;
|
|
||||||
case IDM_SOUNDWINDOW: return IDM_SOUNDWINDOW_PARENT;
|
|
||||||
case IDM_VIDEOWINDOW: return IDM_VIDEOWINDOW_PARENT;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString CFrame::WindowNameFromId(int Id)
|
|
||||||
{
|
|
||||||
switch(Id)
|
|
||||||
{
|
|
||||||
case IDM_LOGWINDOW: return wxT("Log");
|
|
||||||
case IDM_CONSOLEWINDOW: return wxT("Console");
|
|
||||||
case IDM_CODEWINDOW: return wxT("Code");
|
|
||||||
case IDM_REGISTERWINDOW: return wxT("Registers");
|
|
||||||
case IDM_BREAKPOINTWINDOW: return wxT("Breakpoints");
|
|
||||||
case IDM_MEMORYWINDOW: return wxT("Memory");
|
|
||||||
case IDM_JITWINDOW: return wxT("JIT");
|
|
||||||
case IDM_SOUNDWINDOW: return wxT("Sound");
|
|
||||||
case IDM_VIDEOWINDOW: return wxT("Video");
|
|
||||||
}
|
|
||||||
return wxT("");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close all panes with notebooks
|
// Close all panes with notebooks
|
||||||
void CFrame::CloseAllNotebooks()
|
void CFrame::CloseAllNotebooks()
|
||||||
{
|
{
|
||||||
|
|
|
@ -882,8 +882,15 @@ void CFrame::DoStop()
|
||||||
if(Frame::IsPlayingInput())
|
if(Frame::IsPlayingInput())
|
||||||
Frame::EndPlayInput();
|
Frame::EndPlayInput();
|
||||||
|
|
||||||
|
// These windows cause segmentation faults if they are open when the emulator
|
||||||
|
// stops. It has something to do with the the wxAuiManager update.
|
||||||
|
if (g_pCodeWindow)
|
||||||
|
{
|
||||||
|
g_pCodeWindow->ToggleDLLWindow(IDM_SOUNDWINDOW, false);
|
||||||
|
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false);
|
||||||
|
}
|
||||||
|
|
||||||
Core::Stop();
|
Core::Stop();
|
||||||
UpdateGUI();
|
|
||||||
|
|
||||||
// Destroy the renderer frame when not rendering to main
|
// Destroy the renderer frame when not rendering to main
|
||||||
m_RenderFrame->Disconnect(wxID_ANY, wxEVT_SIZE,
|
m_RenderFrame->Disconnect(wxID_ANY, wxEVT_SIZE,
|
||||||
|
@ -902,6 +909,8 @@ void CFrame::DoStop()
|
||||||
m_RenderFrame->Destroy();
|
m_RenderFrame->Destroy();
|
||||||
m_RenderParent = NULL;
|
m_RenderParent = NULL;
|
||||||
|
|
||||||
|
UpdateGUI();
|
||||||
|
|
||||||
// Clean framerate indications from the status bar.
|
// Clean framerate indications from the status bar.
|
||||||
m_pStatusBar->SetStatusText(wxT(" "), 0);
|
m_pStatusBar->SetStatusText(wxT(" "), 0);
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,28 @@ enum
|
||||||
IDM_SOUNDWINDOW,
|
IDM_SOUNDWINDOW,
|
||||||
IDM_VIDEOWINDOW,
|
IDM_VIDEOWINDOW,
|
||||||
|
|
||||||
|
// Float Window IDs
|
||||||
|
IDM_LOGWINDOW_PARENT,
|
||||||
|
IDM_CONSOLEWINDOW_PARENT,
|
||||||
|
IDM_CODEWINDOW_PARENT,
|
||||||
|
IDM_REGISTERWINDOW_PARENT,
|
||||||
|
IDM_BREAKPOINTWINDOW_PARENT,
|
||||||
|
IDM_MEMORYWINDOW_PARENT,
|
||||||
|
IDM_JITWINDOW_PARENT,
|
||||||
|
IDM_SOUNDWINDOW_PARENT,
|
||||||
|
IDM_VIDEOWINDOW_PARENT,
|
||||||
|
|
||||||
|
// Float popup menu IDs
|
||||||
|
IDM_FLOAT_LOGWINDOW,
|
||||||
|
IDM_FLOAT_CONSOLEWINDOW,
|
||||||
|
IDM_FLOAT_CODEWINDOW,
|
||||||
|
IDM_FLOAT_REGISTERWINDOW,
|
||||||
|
IDM_FLOAT_BREAKPOINTWINDOW,
|
||||||
|
IDM_FLOAT_MEMORYWINDOW,
|
||||||
|
IDM_FLOAT_JITWINDOW,
|
||||||
|
IDM_FLOAT_SOUNDWINDOW,
|
||||||
|
IDM_FLOAT_VIDEOWINDOW,
|
||||||
|
|
||||||
// Symbols
|
// Symbols
|
||||||
IDM_CLEARSYMBOLS,
|
IDM_CLEARSYMBOLS,
|
||||||
IDM_CLEANSYMBOLS, // not used
|
IDM_CLEANSYMBOLS, // not used
|
||||||
|
@ -185,16 +207,6 @@ enum
|
||||||
IDM_GOTOPC,
|
IDM_GOTOPC,
|
||||||
IDM_ADDRBOX,
|
IDM_ADDRBOX,
|
||||||
|
|
||||||
IDM_FLOAT_LOGWINDOW,
|
|
||||||
IDM_FLOAT_CONSOLEWINDOW,
|
|
||||||
IDM_FLOAT_CODEWINDOW,
|
|
||||||
IDM_FLOAT_REGISTERWINDOW,
|
|
||||||
IDM_FLOAT_BREAKPOINTWINDOW,
|
|
||||||
IDM_FLOAT_MEMORYWINDOW,
|
|
||||||
IDM_FLOAT_JITWINDOW,
|
|
||||||
IDM_FLOAT_SOUNDWINDOW,
|
|
||||||
IDM_FLOAT_VIDEOWINDOW,
|
|
||||||
|
|
||||||
ID_TOOLBAR_AUI,
|
ID_TOOLBAR_AUI,
|
||||||
IDM_SAVE_PERSPECTIVE,
|
IDM_SAVE_PERSPECTIVE,
|
||||||
IDM_ADD_PERSPECTIVE,
|
IDM_ADD_PERSPECTIVE,
|
||||||
|
@ -206,16 +218,6 @@ enum
|
||||||
IDM_PERSPECTIVES_100 = IDM_PERSPECTIVES_0 + 100,
|
IDM_PERSPECTIVES_100 = IDM_PERSPECTIVES_0 + 100,
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
IDM_LOGWINDOW_PARENT, // Window IDs
|
|
||||||
IDM_CONSOLEWINDOW_PARENT,
|
|
||||||
IDM_CODEWINDOW_PARENT,
|
|
||||||
IDM_REGISTERWINDOW_PARENT,
|
|
||||||
IDM_BREAKPOINTWINDOW_PARENT,
|
|
||||||
IDM_MEMORYWINDOW_PARENT,
|
|
||||||
IDM_JITWINDOW_PARENT,
|
|
||||||
IDM_SOUNDWINDOW_PARENT,
|
|
||||||
IDM_VIDEOWINDOW_PARENT,
|
|
||||||
|
|
||||||
IDM_TOGGLE_DUALCORE, // Other
|
IDM_TOGGLE_DUALCORE, // Other
|
||||||
IDM_TOGGLE_SKIPIDLE,
|
IDM_TOGGLE_SKIPIDLE,
|
||||||
IDM_TOGGLE_TOOLBAR,
|
IDM_TOGGLE_TOOLBAR,
|
||||||
|
|
|
@ -48,8 +48,9 @@ BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
|
||||||
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxString &, const wxPoint &position, const wxSize& size, long style)
|
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos,
|
||||||
: wxPanel(parent, id, position, size, style)
|
const wxSize& size, long style, const wxString& name)
|
||||||
|
: wxPanel(parent, id, pos, size, style, name)
|
||||||
, Parent(parent) , m_LogAccess(true)
|
, Parent(parent) , m_LogAccess(true)
|
||||||
, m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
, m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
||||||
, m_LogSection(1)
|
, m_LogSection(1)
|
||||||
|
|
|
@ -54,10 +54,11 @@ class CLogWindow : public wxPanel, LogListener
|
||||||
public:
|
public:
|
||||||
CLogWindow(CFrame *parent,
|
CLogWindow(CFrame *parent,
|
||||||
wxWindowID id = wxID_ANY,
|
wxWindowID id = wxID_ANY,
|
||||||
const wxString& title = wxT("Log"),
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxPoint& pos = wxPoint(100, 700),
|
const wxSize& size = wxDefaultSize,
|
||||||
const wxSize& size = wxSize(800, 270),
|
long style = wxTAB_TRAVERSAL,
|
||||||
long style = wxNO_BORDER);
|
const wxString& name = wxT("Log")
|
||||||
|
);
|
||||||
~CLogWindow();
|
~CLogWindow();
|
||||||
void NotifyUpdate();
|
void NotifyUpdate();
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ enum PLUGIN_COMM
|
||||||
WM_USER_CREATE,
|
WM_USER_CREATE,
|
||||||
WM_USER_SETCURSOR,
|
WM_USER_SETCURSOR,
|
||||||
WM_USER_KEYDOWN,
|
WM_USER_KEYDOWN,
|
||||||
VIDEO_DESTROY, // The video debugging window was destroyed
|
|
||||||
AUDIO_DESTROY, // The audio debugging window was destroyed
|
|
||||||
WIIMOTE_DISCONNECT, // Disconnect Wiimote
|
WIIMOTE_DISCONNECT, // Disconnect Wiimote
|
||||||
INPUT_FRAME_COUNTER // Wind back the frame counter for rerecording
|
INPUT_FRAME_COUNTER // Wind back the frame counter for rerecording
|
||||||
};
|
};
|
||||||
|
@ -126,7 +124,7 @@ EXPORT void CALL DllConfig(HWND _hParent);
|
||||||
// input: a handle to the window that calls this function
|
// input: a handle to the window that calls this function
|
||||||
// output: none
|
// output: none
|
||||||
//
|
//
|
||||||
EXPORT void CALL DllDebugger(void *_hParent, bool Show);
|
EXPORT void* CALL DllDebugger(void *_hParent, bool Show);
|
||||||
|
|
||||||
// ___________________________________________________________________________
|
// ___________________________________________________________________________
|
||||||
// Function: DllSetGlobals
|
// Function: DllSetGlobals
|
||||||
|
|
|
@ -119,8 +119,9 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void DllDebugger(void *_hParent, bool Show)
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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)
|
void DSPDebugInterface::getRawMemoryString(int memory, unsigned int address, char *dest, int max_size)
|
||||||
{
|
{
|
||||||
|
if (DSPCore_GetState() == DSPCORE_STOP)
|
||||||
|
{
|
||||||
|
dest[0] = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (memory) {
|
switch (memory) {
|
||||||
case 0: // IMEM
|
case 0: // IMEM
|
||||||
switch (address >> 12) {
|
switch (address >> 12) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent)
|
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent)
|
||||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(700, 800),
|
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(700, 800),
|
||||||
wxTAB_TRAVERSAL, _("Sound"))
|
wxTAB_TRAVERSAL, _("DSP LLE Debugger"))
|
||||||
, m_CachedStepCounter(-1)
|
, m_CachedStepCounter(-1)
|
||||||
{
|
{
|
||||||
// notify wxAUI which frame to use
|
// notify wxAUI which frame to use
|
||||||
|
@ -125,26 +125,29 @@ void DSPDebuggerLLE::OnClose(wxCloseEvent& event)
|
||||||
|
|
||||||
void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
|
void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
if (DSPCore_GetState() == DSPCORE_STOP)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
case ID_RUNTOOL:
|
case ID_RUNTOOL:
|
||||||
if (DSPCore_GetState() == DSPCORE_RUNNING)
|
if (DSPCore_GetState() == DSPCORE_RUNNING)
|
||||||
DSPCore_SetState(DSPCORE_STEPPING);
|
DSPCore_SetState(DSPCORE_STEPPING);
|
||||||
else
|
else
|
||||||
DSPCore_SetState(DSPCORE_RUNNING);
|
DSPCore_SetState(DSPCORE_RUNNING);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_STEPTOOL:
|
case ID_STEPTOOL:
|
||||||
if (DSPCore_GetState() == DSPCORE_STEPPING)
|
if (DSPCore_GetState() == DSPCORE_STEPPING)
|
||||||
{
|
{
|
||||||
DSPCore_Step();
|
DSPCore_Step();
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SHOWPCTOOL:
|
case ID_SHOWPCTOOL:
|
||||||
FocusOnPC();
|
FocusOnPC();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateState();
|
UpdateState();
|
||||||
|
|
|
@ -202,24 +202,13 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
|
||||||
DSP_ClearAudioBuffer((newState == PLUGIN_EMUSTATE_PLAY) ? false : true);
|
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 defined(HAVE_WX) && HAVE_WX
|
||||||
if (Show)
|
m_DebuggerFrame = new DSPDebuggerLLE((wxWindow *)_hParent);
|
||||||
{
|
return (void *)m_DebuggerFrame;
|
||||||
if (!m_DebuggerFrame)
|
#else
|
||||||
m_DebuggerFrame = new DSPDebuggerLLE((wxWindow *)_hParent);
|
return NULL;
|
||||||
m_DebuggerFrame->Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_DebuggerFrame)
|
|
||||||
{
|
|
||||||
m_DebuggerFrame->Close();
|
|
||||||
m_DebuggerFrame->Destroy();
|
|
||||||
m_DebuggerFrame = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,9 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DllDebugger(void *_hParent, bool Show)
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTAB_TRAVERSAL,
|
long style = wxTAB_TRAVERSAL,
|
||||||
const wxString &title = wxT("Video"));
|
const wxString &title = wxT("DX9 Debugger"));
|
||||||
|
|
||||||
virtual ~GFXDebuggerDX9();
|
virtual ~GFXDebuggerDX9();
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ GFXConfigDialogDX *m_ConfigFrame = NULL;
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
#include "Debugger/Debugger.h"
|
#include "Debugger/Debugger.h"
|
||||||
GFXDebuggerDX9 *m_DebuggerFrame = NULL;
|
|
||||||
#endif // HAVE_WX
|
#endif // HAVE_WX
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
@ -97,24 +96,12 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DllDebugger(void *_hParent, bool Show)
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (Show)
|
return new GFXDebuggerDX9((wxWindow *)_hParent);
|
||||||
{
|
#else
|
||||||
if (!m_DebuggerFrame)
|
return NULL;
|
||||||
m_DebuggerFrame = new GFXDebuggerDX9((wxWindow *)_hParent);
|
|
||||||
m_DebuggerFrame->Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_DebuggerFrame)
|
|
||||||
{
|
|
||||||
m_DebuggerFrame->Close();
|
|
||||||
m_DebuggerFrame->Destroy();
|
|
||||||
m_DebuggerFrame = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTAB_TRAVERSAL,
|
long style = wxTAB_TRAVERSAL,
|
||||||
const wxString &title = wxT("Video"));
|
const wxString &title = wxT("OpenGL Debugger"));
|
||||||
|
|
||||||
virtual ~GFXDebuggerOGL();
|
virtual ~GFXDebuggerOGL();
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,6 @@ Make AA apply instantly during gameplay if possible
|
||||||
#include "GUI/ConfigDlg.h"
|
#include "GUI/ConfigDlg.h"
|
||||||
GFXConfigDialogOGL *m_ConfigFrame = NULL;
|
GFXConfigDialogOGL *m_ConfigFrame = NULL;
|
||||||
#include "Debugger/Debugger.h"
|
#include "Debugger/Debugger.h"
|
||||||
static GFXDebuggerOGL *m_DebuggerFrame = NULL;
|
|
||||||
#endif // HAVE_WX
|
#endif // HAVE_WX
|
||||||
|
|
||||||
#include "VideoConfig.h"
|
#include "VideoConfig.h"
|
||||||
|
@ -152,24 +151,12 @@ wxWindow* GetParentedWxWindow(HWND Parent)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DllDebugger(void *_hParent, bool Show)
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (Show)
|
return new GFXDebuggerOGL((wxWindow *)_hParent);
|
||||||
{
|
#else
|
||||||
if (!m_DebuggerFrame)
|
return NULL;
|
||||||
m_DebuggerFrame = new GFXDebuggerOGL((wxWindow *)_hParent);
|
|
||||||
m_DebuggerFrame->Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_DebuggerFrame)
|
|
||||||
{
|
|
||||||
m_DebuggerFrame->Close();
|
|
||||||
m_DebuggerFrame->Destroy();
|
|
||||||
m_DebuggerFrame = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,9 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllDebugger(void *_hParent, bool Show)
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllConfig(HWND _hParent)
|
void DllConfig(HWND _hParent)
|
||||||
|
|
|
@ -152,7 +152,10 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DllDebugger(void *_hParent, bool Show) {}
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void DllConfig(HWND _hParent)
|
void DllConfig(HWND _hParent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -320,9 +320,9 @@ void DllConfig(HWND _hParent)
|
||||||
// input: a handle to the window that calls this function
|
// input: a handle to the window that calls this function
|
||||||
// output: none
|
// output: none
|
||||||
//
|
//
|
||||||
void DllDebugger(void *_hParent, bool Show)
|
void *DllDebugger(void *_hParent, bool Show)
|
||||||
{
|
{
|
||||||
// wut?
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ___________________________________________________________________________
|
// ___________________________________________________________________________
|
||||||
|
|
Loading…
Reference in New Issue