mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 01:29:41 +01:00
Defer initialization of the GE dbg preview.
Maybe it's causing slowdown on some cards to init a new context?
This commit is contained in:
1 parent
a528f797b1
commit
4cae7bf8d3
2 files changed
+18
-5
No files matched your search
@@ -86,18 +86,23 @@ static void RunPauseAction() {
|
||||
}
|
||||
|
||||
CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
|
||||
: Dialog((LPCSTR)IDD_GEDEBUGGER, _hInstance, _hParent) {
|
||||
: Dialog((LPCSTR)IDD_GEDEBUGGER, _hInstance, _hParent), frameWindow(NULL) {
|
||||
breakCmds.resize(256, false);
|
||||
// TODO: Could be scrollable in case the framebuf is larger? Also should be better positioned.
|
||||
frameWindow = new SimpleGLWindow(m_hInstance, m_hDlg, (750 - 512) / 2, 40, 512, 272);
|
||||
// TODO: Why doesn't this work?
|
||||
frameWindow->Clear();
|
||||
}
|
||||
|
||||
CGEDebugger::~CGEDebugger() {
|
||||
delete frameWindow;
|
||||
}
|
||||
|
||||
void CGEDebugger::SetupFrameWindow() {
|
||||
if (frameWindow == NULL) {
|
||||
// TODO: Could be scrollable in case the framebuf is larger? Also should be better positioned.
|
||||
frameWindow = new SimpleGLWindow(m_hInstance, m_hDlg, (750 - 512) / 2, 40, 512, 272);
|
||||
// TODO: Why doesn't this work?
|
||||
frameWindow->Clear();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
@@ -111,10 +116,15 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
Show(false);
|
||||
return TRUE;
|
||||
|
||||
case WM_SHOWWINDOW:
|
||||
SetupFrameWindow();
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDC_GEDBG_BREAK:
|
||||
attached = true;
|
||||
SetupFrameWindow();
|
||||
//breakNextOp = true;
|
||||
pauseWait.notify_one();
|
||||
breakNextDraw = true;
|
||||
|
||||
@@ -31,5 +31,8 @@ public:
|
||||
protected:
|
||||
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private:
|
||||
void SetupFrameWindow();
|
||||
|
||||
SimpleGLWindow *frameWindow;
|
||||
};
|
||||
Reference in new issue
Block a user