[Project64] Manually set g_debugger
This commit is contained in:
parent
a9683b36fb
commit
f0e761bd36
|
@ -13,32 +13,31 @@
|
||||||
|
|
||||||
CPj64Module _Module;
|
CPj64Module _Module;
|
||||||
|
|
||||||
CDebuggerUI::CDebuggerUI () :
|
CDebuggerUI::CDebuggerUI() :
|
||||||
m_MemoryDump(NULL),
|
m_MemoryDump(NULL),
|
||||||
m_MemoryView(NULL),
|
m_MemoryView(NULL),
|
||||||
m_MemorySearch(NULL),
|
m_MemorySearch(NULL),
|
||||||
m_DebugTLB(NULL)
|
m_DebugTLB(NULL)
|
||||||
{
|
{
|
||||||
g_Settings->RegisterChangeCB(GameRunning_InReset,this,(CSettings::SettingChangedFunc)GameReset);
|
g_Settings->RegisterChangeCB(GameRunning_InReset, this, (CSettings::SettingChangedFunc)GameReset);
|
||||||
g_Debugger = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CDebuggerUI::~CDebuggerUI (void)
|
CDebuggerUI::~CDebuggerUI(void)
|
||||||
{
|
{
|
||||||
g_Settings->UnregisterChangeCB(GameRunning_InReset,this,(CSettings::SettingChangedFunc)GameReset);
|
g_Settings->UnregisterChangeCB(GameRunning_InReset, this, (CSettings::SettingChangedFunc)GameReset);
|
||||||
Debug_Reset();
|
Debug_Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebuggerUI::GameReset ( CDebuggerUI * _this )
|
void CDebuggerUI::GameReset(CDebuggerUI * _this)
|
||||||
{
|
{
|
||||||
if (!g_Settings->LoadBool(GameRunning_InReset))
|
if (!g_Settings->LoadBool(GameRunning_InReset))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_this->Debug_Reset();
|
_this->Debug_Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebuggerUI::Debug_Reset ( void )
|
void CDebuggerUI::Debug_Reset(void)
|
||||||
{
|
{
|
||||||
if (m_MemoryDump)
|
if (m_MemoryDump)
|
||||||
{
|
{
|
||||||
|
@ -82,7 +81,7 @@ void CDebuggerUI::Debug_ShowMemoryDump()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebuggerUI::Debug_ShowMemoryWindow ( void )
|
void CDebuggerUI::Debug_ShowMemoryWindow(void)
|
||||||
{
|
{
|
||||||
if (g_MMU == NULL)
|
if (g_MMU == NULL)
|
||||||
{
|
{
|
||||||
|
@ -98,16 +97,16 @@ void CDebuggerUI::Debug_ShowMemoryWindow ( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebuggerUI::Debug_ShowMemoryLocation ( uint32_t Address, bool VAddr )
|
void CDebuggerUI::Debug_ShowMemoryLocation(uint32_t Address, bool VAddr)
|
||||||
{
|
{
|
||||||
Debug_ShowMemoryWindow();
|
Debug_ShowMemoryWindow();
|
||||||
if (m_MemoryView)
|
if (m_MemoryView)
|
||||||
{
|
{
|
||||||
m_MemoryView->ShowAddress(Address,VAddr);
|
m_MemoryView->ShowAddress(Address, VAddr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDebuggerUI::Debug_ShowTLBWindow (void)
|
void CDebuggerUI::Debug_ShowTLBWindow(void)
|
||||||
{
|
{
|
||||||
if (g_MMU == NULL)
|
if (g_MMU == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,8 +16,9 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
|
||||||
|
|
||||||
//Create the main window with Menu
|
//Create the main window with Menu
|
||||||
WriteTrace(TraceUserInterface, TraceDebug, "Create Main Window");
|
WriteTrace(TraceUserInterface, TraceDebug, "Create Main Window");
|
||||||
CMainGui MainWindow(true, stdstr_f("Project64 %s", VER_FILE_VERSION_STR).c_str()), HiddenWindow(false);
|
CMainGui MainWindow(true, stdstr_f("Project64 %s", VER_FILE_VERSION_STR).c_str()), HiddenWindow(false);
|
||||||
CMainMenu MainMenu(&MainWindow);
|
CMainMenu MainMenu(&MainWindow);
|
||||||
|
g_Debugger = &MainWindow;
|
||||||
g_Plugins->SetRenderWindows(&MainWindow, &HiddenWindow);
|
g_Plugins->SetRenderWindows(&MainWindow, &HiddenWindow);
|
||||||
Notify().SetMainWindow(&MainWindow);
|
Notify().SetMainWindow(&MainWindow);
|
||||||
CSupportWindow SupportWindow;
|
CSupportWindow SupportWindow;
|
||||||
|
@ -40,7 +41,6 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
|
||||||
stdstr IPLROM = g_Settings->LoadStringVal(File_DiskIPLPath);
|
stdstr IPLROM = g_Settings->LoadStringVal(File_DiskIPLPath);
|
||||||
if ((IPLROM.length() <= 0) || (!CN64System::RunFileImage(IPLROM.c_str())))
|
if ((IPLROM.length() <= 0) || (!CN64System::RunFileImage(IPLROM.c_str())))
|
||||||
{
|
{
|
||||||
|
|
||||||
CPath FileName;
|
CPath FileName;
|
||||||
const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0";
|
const char * Filter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0";
|
||||||
if (FileName.SelectFile(NULL, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true))
|
if (FileName.SelectFile(NULL, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true))
|
||||||
|
|
Loading…
Reference in New Issue