Revive the GFX debugger window. Turns out to be considerably easier than the DSPLLE debugger window.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7001 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-01-31 02:39:25 +00:00
parent 1ee18ff146
commit fec5ed92ff
6 changed files with 21 additions and 52 deletions

View File

@ -139,6 +139,7 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
, m_BreakpointWindow(NULL) , m_BreakpointWindow(NULL)
, m_MemoryWindow(NULL) , m_MemoryWindow(NULL)
, m_JitWindow(NULL) , m_JitWindow(NULL)
, m_VideoWindow(NULL)
, codeview(NULL) , codeview(NULL)
{ {
InitBitmaps(); InitBitmaps();

View File

@ -37,6 +37,7 @@ class CBreakPointWindow;
class CMemoryWindow; class CMemoryWindow;
class CJitWindow; class CJitWindow;
class CCodeView; class CCodeView;
class GFXDebuggerPanel;
class CCodeWindow class CCodeWindow
: public wxPanel : public wxPanel
@ -91,7 +92,7 @@ class CCodeWindow
void ToggleMemoryWindow(bool bShow); void ToggleMemoryWindow(bool bShow);
void ToggleJitWindow(bool bShow); void ToggleJitWindow(bool bShow);
void ToggleSoundWindow(bool bShow); void ToggleSoundWindow(bool bShow);
void ToggleDLLWindow(int Id, bool bShow); void ToggleVideoWindow(bool bShow);
void OnChangeFont(wxCommandEvent& event); void OnChangeFont(wxCommandEvent& event);
@ -106,6 +107,7 @@ class CCodeWindow
CBreakPointWindow* m_BreakpointWindow; CBreakPointWindow* m_BreakpointWindow;
CMemoryWindow* m_MemoryWindow; CMemoryWindow* m_MemoryWindow;
CJitWindow* m_JitWindow; CJitWindow* m_JitWindow;
GFXDebuggerPanel* m_VideoWindow;
// Settings // Settings
bool bAutomaticStart; bool bBootToPause; bool bAutomaticStart; bool bBootToPause;

View File

@ -37,6 +37,7 @@
#include "BreakpointWindow.h" #include "BreakpointWindow.h"
#include "MemoryWindow.h" #include "MemoryWindow.h"
#include "JitWindow.h" #include "JitWindow.h"
#include "DebuggerPanel.h"
#include "FileUtil.h" #include "FileUtil.h"
#include "CodeWindow.h" #include "CodeWindow.h"
@ -426,7 +427,7 @@ void CCodeWindow::OpenPages()
if (bShowOnStart[IDM_SOUNDWINDOW - IDM_LOGWINDOW]) if (bShowOnStart[IDM_SOUNDWINDOW - IDM_LOGWINDOW])
ToggleSoundWindow(true); ToggleSoundWindow(true);
if (bShowOnStart[IDM_VIDEOWINDOW - IDM_LOGWINDOW]) if (bShowOnStart[IDM_VIDEOWINDOW - IDM_LOGWINDOW])
ToggleDLLWindow(IDM_VIDEOWINDOW, true); ToggleVideoWindow(true);
} }
void CCodeWindow::ToggleCodeWindow(bool bShow) void CCodeWindow::ToggleCodeWindow(bool bShow)
@ -533,47 +534,20 @@ void CCodeWindow::ToggleSoundWindow(bool bShow)
#endif #endif
} }
// Notice: This windows docking will produce several wx debugging messages for plugin void CCodeWindow::ToggleVideoWindow(bool bShow)
// windows when ::GetWindowRect and ::DestroyWindow fails in wxApp::CleanUp() for the
// plugin.
// Toggle Sound Debugging Window
void CCodeWindow::ToggleDLLWindow(int Id, bool bShow)
{ {
std::string DLLName; GetMenuBar()->FindItem(IDM_VIDEOWINDOW)->Check(bShow);
//int PluginType;
wxPanel *Win;
switch(Id)
{
default:
PanicAlert("CCodeWindow::ToggleDLLWindow called with invalid Id");
return;
}
if (bShow) if (bShow)
{ {
// Show window if (!m_VideoWindow)
//Win = (wxPanel *)CPluginManager::GetInstance().OpenDebug(Parent, m_VideoWindow = new GFXDebuggerPanel(Parent, IDM_VIDEOWINDOW);
// DLLName.c_str(), (PLUGIN_TYPE)PluginType, bShow); Parent->DoAddPage(m_VideoWindow,
iNbAffiliation[IDM_VIDEOWINDOW - IDM_LOGWINDOW],
//if (Win) Parent->bFloatWindow[IDM_VIDEOWINDOW - IDM_LOGWINDOW]);
//{
// Win->Show();
// Win->SetId(Id);
// Parent->DoAddPage(Win,
// iNbAffiliation[Id - IDM_LOGWINDOW],
// Parent->bFloatWindow[Id - IDM_LOGWINDOW]);
//}
} }
else else // Close
{ {
//Win = (wxPanel *)FindWindowById(Id); Parent->DoRemovePage(m_VideoWindow, false);
//if (Win) m_VideoWindow = NULL;
//{
// Parent->DoRemovePage(Win, false);
// Win->Destroy();
//}
} }
GetMenuBar()->FindItem(Id)->Check(bShow && !!Win);
} }

View File

@ -197,7 +197,7 @@ void CFrame::OnToggleWindow(wxCommandEvent& event)
g_pCodeWindow->ToggleSoundWindow(bShow); g_pCodeWindow->ToggleSoundWindow(bShow);
break; break;
case IDM_VIDEOWINDOW: case IDM_VIDEOWINDOW:
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, bShow); g_pCodeWindow->ToggleVideoWindow(bShow);
break; break;
} }
} }
@ -216,7 +216,7 @@ void CFrame::ClosePages()
g_pCodeWindow->ToggleMemoryWindow(false); g_pCodeWindow->ToggleMemoryWindow(false);
g_pCodeWindow->ToggleJitWindow(false); g_pCodeWindow->ToggleJitWindow(false);
g_pCodeWindow->ToggleSoundWindow(false); g_pCodeWindow->ToggleSoundWindow(false);
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false); g_pCodeWindow->ToggleVideoWindow(false);
} }
} }
@ -258,7 +258,7 @@ void CFrame::OnNotebookPageClose(wxAuiNotebookEvent& event)
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_SOUNDWINDOW) if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_SOUNDWINDOW)
g_pCodeWindow->ToggleSoundWindow(false); g_pCodeWindow->ToggleSoundWindow(false);
if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_VIDEOWINDOW) if (Ctrl->GetPage(event.GetSelection())->GetId() == IDM_VIDEOWINDOW)
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false); g_pCodeWindow->ToggleVideoWindow(false);
} }
void CFrame::OnFloatingPageClosed(wxCloseEvent& event) void CFrame::OnFloatingPageClosed(wxCloseEvent& event)

View File

@ -939,11 +939,6 @@ void CFrame::DoStop()
if(Frame::IsPlayingInput() || Frame::IsRecordingInput()) if(Frame::IsPlayingInput() || Frame::IsRecordingInput())
Frame::EndPlayInput(); Frame::EndPlayInput();
// The video debugger window causes a segmentation fault if open when the
// emulator stops. It has something to do with the the wxAuiManager update.
if (g_pCodeWindow)
g_pCodeWindow->ToggleDLLWindow(IDM_VIDEOWINDOW, false);
BootManager::Stop(); BootManager::Stop();
#if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER #if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER

View File

@ -43,8 +43,5 @@ elseif(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
set(LIBS ${LIBS} clrun) set(LIBS ${LIBS} clrun)
endif() endif()
add_library(Plugin_VideoSoftware MODULE ${SRCS}) add_library(videosoftware STATIC ${SRCS})
target_link_libraries(Plugin_VideoSoftware ${LIBS}) target_link_libraries(videosoftware ${LIBS})
install(TARGETS Plugin_VideoSoftware
LIBRARY DESTINATION ${plugindir}
RUNTIME DESTINATION ${plugindir})