mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Windows debugger: Load the dialogs on demand.
I think this is especially good for the Ge dialog since we now can avoid initializing that extra GL context unless you open the dialog.
This commit is contained in:
1 parent
a783f49948
commit
c004e9ca9d
6 files changed
+36
-16
No files matched your search
+21
-12
@@ -533,36 +533,46 @@ namespace MainWindow
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CreateDebugWindows() {
|
||||
disasmWindow = new CDisasm(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(disasmWindow);
|
||||
disasmWindow->Show(g_Config.bShowDebuggerOnLoad, false);
|
||||
void CreateDisasmWindow() {
|
||||
if (!disasmWindow) {
|
||||
disasmWindow = new CDisasm(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(disasmWindow);
|
||||
}
|
||||
}
|
||||
|
||||
void CreateGeDebuggerWindow() {
|
||||
if (!geDebuggerWindow) {
|
||||
#if PPSSPP_API(ANY_GL)
|
||||
geDebuggerWindow = new CGEDebugger(MainWindow::GetHInstance(), MainWindow::GetHWND());
|
||||
DialogManager::AddDlg(geDebuggerWindow);
|
||||
geDebuggerWindow = new CGEDebugger(MainWindow::GetHInstance(), MainWindow::GetHWND());
|
||||
DialogManager::AddDlg(geDebuggerWindow);
|
||||
#endif
|
||||
memoryWindow = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(memoryWindow);
|
||||
}
|
||||
}
|
||||
|
||||
void CreateMemoryWindow() {
|
||||
if (!memoryWindow) {
|
||||
memoryWindow = new CMemoryDlg(MainWindow::GetHInstance(), MainWindow::GetHWND(), currentDebugMIPS);
|
||||
DialogManager::AddDlg(memoryWindow);
|
||||
}
|
||||
}
|
||||
|
||||
void DestroyDebugWindows() {
|
||||
DialogManager::RemoveDlg(disasmWindow);
|
||||
if (disasmWindow)
|
||||
delete disasmWindow;
|
||||
disasmWindow = 0;
|
||||
disasmWindow = nullptr;
|
||||
|
||||
#if PPSSPP_API(ANY_GL)
|
||||
DialogManager::RemoveDlg(geDebuggerWindow);
|
||||
if (geDebuggerWindow)
|
||||
delete geDebuggerWindow;
|
||||
geDebuggerWindow = 0;
|
||||
geDebuggerWindow = nullptr;
|
||||
#endif
|
||||
|
||||
DialogManager::RemoveDlg(memoryWindow);
|
||||
if (memoryWindow)
|
||||
delete memoryWindow;
|
||||
memoryWindow = 0;
|
||||
memoryWindow = nullptr;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK DisplayProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
@@ -928,7 +938,6 @@ namespace MainWindow
|
||||
disasmWindow->NotifyMapLoaded();
|
||||
if (memoryWindow)
|
||||
memoryWindow->NotifyMapLoaded();
|
||||
|
||||
if (disasmWindow)
|
||||
disasmWindow->UpdateDialog();
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user