mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix a few leaks in the Windows UI code.
This commit is contained in:
parent
39d1f4986d
commit
8f09a341df
7 changed files with 25 additions and 2 deletions
|
@ -60,7 +60,8 @@ CtrlMemView::CtrlMemView(HWND _wnd)
|
||||||
|
|
||||||
CtrlMemView::~CtrlMemView()
|
CtrlMemView::~CtrlMemView()
|
||||||
{
|
{
|
||||||
DeleteObject(font);
|
DeleteObject(font);
|
||||||
|
DeleteObject(underlineFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CtrlMemView::init()
|
void CtrlMemView::init()
|
||||||
|
|
|
@ -171,7 +171,7 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di
|
||||||
bottomTabs->ShowTab(memHandle);
|
bottomTabs->ShowTab(memHandle);
|
||||||
|
|
||||||
// init status bar
|
// init status bar
|
||||||
statusBarWnd = CreateStatusWindow(WS_CHILD | WS_VISIBLE, L"", m_hDlg, IDC_DISASMSTATUSBAR);
|
statusBarWnd = CreateWindowEx(0, STATUSCLASSNAME, L"", WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, m_hDlg, (HMENU)IDC_DISASMSTATUSBAR, _hInstance, NULL);
|
||||||
if (g_Config.bDisplayStatusBar == false)
|
if (g_Config.bDisplayStatusBar == false)
|
||||||
{
|
{
|
||||||
ShowWindow(statusBarWnd,SW_HIDE);
|
ShowWindow(statusBarWnd,SW_HIDE);
|
||||||
|
@ -187,6 +187,14 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di
|
||||||
|
|
||||||
CDisasm::~CDisasm()
|
CDisasm::~CDisasm()
|
||||||
{
|
{
|
||||||
|
DestroyWindow(statusBarWnd);
|
||||||
|
|
||||||
|
delete leftTabs;
|
||||||
|
delete bottomTabs;
|
||||||
|
delete breakpointList;
|
||||||
|
delete threadList;
|
||||||
|
delete stackTraceView;
|
||||||
|
delete moduleList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDisasm::stepInto()
|
void CDisasm::stepInto()
|
||||||
|
|
|
@ -78,6 +78,9 @@ LRESULT CALLBACK CtrlDisplayListView::wndProc(HWND hwnd, UINT msg, WPARAM wParam
|
||||||
|
|
||||||
// Continue with window creation.
|
// Continue with window creation.
|
||||||
return win != NULL;
|
return win != NULL;
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
delete win;
|
||||||
|
break;
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
win->redraw();
|
win->redraw();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -39,6 +39,10 @@ public:
|
||||||
static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||||
static CtrlDisplayListView * getFrom(HWND wnd);
|
static CtrlDisplayListView * getFrom(HWND wnd);
|
||||||
|
|
||||||
|
HWND GetHWND() {
|
||||||
|
return wnd;
|
||||||
|
}
|
||||||
|
|
||||||
void onPaint(WPARAM wParam, LPARAM lParam);
|
void onPaint(WPARAM wParam, LPARAM lParam);
|
||||||
void onKeyDown(WPARAM wParam, LPARAM lParam);
|
void onKeyDown(WPARAM wParam, LPARAM lParam);
|
||||||
void onMouseDown(WPARAM wParam, LPARAM lParam, int button);
|
void onMouseDown(WPARAM wParam, LPARAM lParam, int button);
|
||||||
|
|
|
@ -123,6 +123,7 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
|
||||||
}
|
}
|
||||||
|
|
||||||
CGEDebugger::~CGEDebugger() {
|
CGEDebugger::~CGEDebugger() {
|
||||||
|
DestroyWindow(displayList->GetHWND());
|
||||||
CleanupPrimPreview();
|
CleanupPrimPreview();
|
||||||
delete flags;
|
delete flags;
|
||||||
delete lighting;
|
delete lighting;
|
||||||
|
|
|
@ -138,6 +138,10 @@ namespace W32Util
|
||||||
thread_->detach();
|
thread_->detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AsyncBrowseDialog::~AsyncBrowseDialog() {
|
||||||
|
delete thread_;
|
||||||
|
}
|
||||||
|
|
||||||
bool AsyncBrowseDialog::GetResult(std::string &filename) {
|
bool AsyncBrowseDialog::GetResult(std::string &filename) {
|
||||||
filename = filename_;
|
filename = filename_;
|
||||||
return result_;
|
return result_;
|
||||||
|
|
|
@ -28,6 +28,8 @@ namespace W32Util
|
||||||
// For a file (OPEN or SAVE.)
|
// For a file (OPEN or SAVE.)
|
||||||
AsyncBrowseDialog(Type type, HWND parent, UINT completeMsg, std::wstring title, std::wstring initialFolder, std::wstring filter, std::wstring extension);
|
AsyncBrowseDialog(Type type, HWND parent, UINT completeMsg, std::wstring title, std::wstring initialFolder, std::wstring filter, std::wstring extension);
|
||||||
|
|
||||||
|
~AsyncBrowseDialog();
|
||||||
|
|
||||||
bool GetResult(std::string &filename);
|
bool GetResult(std::string &filename);
|
||||||
Type GetType() {
|
Type GetType() {
|
||||||
return type_;
|
return type_;
|
||||||
|
|
Loading…
Add table
Reference in a new issue