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_MemoryWindow(NULL)
, m_JitWindow(NULL)
, m_VideoWindow(NULL)
, codeview(NULL)
{
InitBitmaps();

View File

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

View File

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

View File

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

View File

@ -939,11 +939,6 @@ void CFrame::DoStop()
if(Frame::IsPlayingInput() || Frame::IsRecordingInput())
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();
#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)
endif()
add_library(Plugin_VideoSoftware MODULE ${SRCS})
target_link_libraries(Plugin_VideoSoftware ${LIBS})
install(TARGETS Plugin_VideoSoftware
LIBRARY DESTINATION ${plugindir}
RUNTIME DESTINATION ${plugindir})
add_library(videosoftware STATIC ${SRCS})
target_link_libraries(videosoftware ${LIBS})