diff --git a/Source/Project64/N64System/Debugger/Debugger.cpp b/Source/Project64/N64System/Debugger/Debugger.cpp index 912682389..99a456eeb 100644 --- a/Source/Project64/N64System/Debugger/Debugger.cpp +++ b/Source/Project64/N64System/Debugger/Debugger.cpp @@ -13,32 +13,31 @@ CPj64Module _Module; -CDebuggerUI::CDebuggerUI () : +CDebuggerUI::CDebuggerUI() : m_MemoryDump(NULL), m_MemoryView(NULL), m_MemorySearch(NULL), m_DebugTLB(NULL) { - g_Settings->RegisterChangeCB(GameRunning_InReset,this,(CSettings::SettingChangedFunc)GameReset); - g_Debugger = this; + g_Settings->RegisterChangeCB(GameRunning_InReset, this, (CSettings::SettingChangedFunc)GameReset); } -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(); } -void CDebuggerUI::GameReset ( CDebuggerUI * _this ) +void CDebuggerUI::GameReset(CDebuggerUI * _this) { - if (!g_Settings->LoadBool(GameRunning_InReset)) - { - return; - } - _this->Debug_Reset(); + if (!g_Settings->LoadBool(GameRunning_InReset)) + { + return; + } + _this->Debug_Reset(); } -void CDebuggerUI::Debug_Reset ( void ) +void CDebuggerUI::Debug_Reset(void) { 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) { @@ -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(); 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) { diff --git a/Source/Project64/main.cpp b/Source/Project64/main.cpp index 5883b37e5..bce64d0e1 100644 --- a/Source/Project64/main.cpp +++ b/Source/Project64/main.cpp @@ -16,8 +16,9 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR / //Create the main window with Menu 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); + g_Debugger = &MainWindow; g_Plugins->SetRenderWindows(&MainWindow, &HiddenWindow); Notify().SetMainWindow(&MainWindow); CSupportWindow SupportWindow; @@ -40,7 +41,6 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR / stdstr IPLROM = g_Settings->LoadStringVal(File_DiskIPLPath); if ((IPLROM.length() <= 0) || (!CN64System::RunFileImage(IPLROM.c_str()))) { - 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"; if (FileName.SelectFile(NULL, g_Settings->LoadStringVal(RomList_GameDir).c_str(), Filter, true))