mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-12 17:48:43 +00:00
Speed up game start under Windows by not filling the symbol listbox until the disasm window is opened.
This commit is contained in:
parent
6ac9dfe6b5
commit
84b36d6e61
@ -848,22 +848,33 @@ void CDisasm::SetDebugMode(bool _bDebug, bool switchPC)
|
||||
}
|
||||
}
|
||||
|
||||
void CDisasm::NotifyMapLoaded()
|
||||
{
|
||||
if (g_symbolMap)
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION);
|
||||
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
|
||||
void CDisasm::Show(bool bShow) {
|
||||
if (deferredSymbolFill_ && bShow) {
|
||||
if (g_symbolMap)
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
|
||||
deferredSymbolFill_ = false;
|
||||
}
|
||||
Dialog::Show(bShow);
|
||||
}
|
||||
|
||||
void CDisasm::NotifyMapLoaded() {
|
||||
if (m_bShowState == SW_SHOW) {
|
||||
if (g_symbolMap)
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
|
||||
} else {
|
||||
deferredSymbolFill_ = true;
|
||||
}
|
||||
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg, IDC_DISASMVIEW));
|
||||
ptr->clearFunctions();
|
||||
ptr->redraw();
|
||||
}
|
||||
|
||||
void CDisasm::Goto(u32 addr)
|
||||
{
|
||||
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
|
||||
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg, IDC_DISASMVIEW));
|
||||
ptr->gotoAddr(addr);
|
||||
SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW));
|
||||
ptr->redraw();
|
||||
|
||||
}
|
||||
|
||||
void CDisasm::UpdateDialog(bool _bComplete)
|
||||
|
@ -16,7 +16,8 @@
|
||||
class CDisasm : public Dialog
|
||||
{
|
||||
private:
|
||||
int minWidth,minHeight;
|
||||
int minWidth;
|
||||
int minHeight;
|
||||
DebugInterface *cpu;
|
||||
u64 lastTicks;
|
||||
|
||||
@ -31,8 +32,9 @@ private:
|
||||
std::vector<MemCheck> displayedMemChecks_;
|
||||
bool keepStatusBarText = false;
|
||||
bool hideBottomTabs = false;
|
||||
bool deferredSymbolFill_ = false;
|
||||
|
||||
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
|
||||
void UpdateSize(WORD width, WORD height);
|
||||
void SavePosition();
|
||||
void updateThreadLabel(bool clear);
|
||||
@ -47,7 +49,9 @@ public:
|
||||
CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *cpu);
|
||||
~CDisasm();
|
||||
|
||||
virtual void Update() {
|
||||
void Show(bool bShow) override;
|
||||
|
||||
void Update() override {
|
||||
UpdateDialog(true);
|
||||
SetDebugMode(Core_IsStepping(), false);
|
||||
breakpointList->reloadBreakpoints();
|
||||
|
@ -8,7 +8,7 @@ Dialog::Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent)
|
||||
{
|
||||
m_hInstance = _hInstance;
|
||||
m_hParent = _hParent;
|
||||
m_hResource=res;
|
||||
m_hResource = res;
|
||||
m_bValid = true;
|
||||
Create();
|
||||
}
|
||||
@ -32,12 +32,12 @@ void Dialog::Destroy()
|
||||
|
||||
void Dialog::Show(bool _bShow)
|
||||
{
|
||||
ShowWindow(m_hDlg, _bShow ? SW_NORMAL : SW_HIDE);
|
||||
m_bShowState = _bShow ? SW_NORMAL : SW_HIDE;
|
||||
ShowWindow(m_hDlg, m_bShowState);
|
||||
if (_bShow)
|
||||
BringWindowToTop(m_hDlg);
|
||||
}
|
||||
|
||||
|
||||
INT_PTR Dialog::DlgProcStatic(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
Dialog *dis = (Dialog*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
|
||||
@ -106,4 +106,4 @@ void DialogManager::DestroyAll()
|
||||
for (iter=dialogs.begin(); iter!=dialogs.end(); iter++)
|
||||
delete (*iter);
|
||||
dialogs.clear();
|
||||
}
|
||||
}
|
||||
|
@ -4,32 +4,31 @@
|
||||
|
||||
class Dialog
|
||||
{
|
||||
public:
|
||||
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
|
||||
virtual ~Dialog();
|
||||
|
||||
virtual void Show(bool _bShow);
|
||||
virtual void Update() {}
|
||||
|
||||
HWND GetDlgHandle() {
|
||||
return m_hDlg;
|
||||
}
|
||||
protected:
|
||||
HINSTANCE m_hInstance;
|
||||
virtual void Create();
|
||||
void Destroy();
|
||||
|
||||
HWND m_hParent;
|
||||
HWND m_hDlg;
|
||||
LPCSTR m_hResource;
|
||||
bool m_bValid;
|
||||
UINT m_bShowState = SW_HIDE;
|
||||
|
||||
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
MessageBox(0,L"WTF? Pure Call",0,0);
|
||||
return 0;
|
||||
}
|
||||
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 0;
|
||||
static INT_PTR CALLBACK DlgProcStatic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
virtual void Create();
|
||||
void Destroy();
|
||||
public:
|
||||
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
|
||||
virtual ~Dialog();
|
||||
void Show(bool _bShow);
|
||||
|
||||
virtual void Update() {}
|
||||
|
||||
HWND GetDlgHandle()
|
||||
{
|
||||
return m_hDlg;
|
||||
}
|
||||
private:
|
||||
HINSTANCE m_hInstance;
|
||||
};
|
||||
|
||||
|
||||
@ -42,4 +41,4 @@ public:
|
||||
static void EnableAll(BOOL enable);
|
||||
static void DestroyAll();
|
||||
static void UpdateAll();
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user