mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 09:19:05 +02:00
commit
620bb14d6b
4 files changed
+1
-69
No files matched your search
@@ -663,67 +663,4 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symType) const
|
||||
RedrawWindow(listbox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
}
|
||||
|
||||
void SymbolMap::FillSymbolComboBox(HWND comboxBox, SymbolType symType) const
|
||||
{
|
||||
wchar_t temp[256];
|
||||
lock_guard guard(lock_);
|
||||
|
||||
SendMessage(comboxBox, WM_SETREDRAW, FALSE, 0);
|
||||
ComboBox_ResetContent(comboxBox);
|
||||
|
||||
switch (symType)
|
||||
{
|
||||
case ST_FUNCTION:
|
||||
{
|
||||
SendMessage(comboxBox, CB_INITSTORAGE, (WPARAM)functions.size(), (LPARAM)functions.size() * 30);
|
||||
|
||||
for (auto it = functions.begin(), end = functions.end(); it != end; ++it)
|
||||
{
|
||||
const FunctionEntry& entry = it->second;
|
||||
const char* name = GetLabelName(it->first);
|
||||
|
||||
if (name != NULL)
|
||||
wsprintf(temp, L"%S", name);
|
||||
else
|
||||
wsprintf(temp, L"0x%08X", it->first);
|
||||
|
||||
int index = ComboBox_AddString(comboxBox,temp);
|
||||
ComboBox_SetItemData(comboxBox,index,it->first);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ST_DATA:
|
||||
{
|
||||
int count = ARRAYSIZE(defaultSymbols)+(int)data.size();
|
||||
SendMessage(comboxBox, CB_INITSTORAGE, (WPARAM)count, (LPARAM)count * 30);
|
||||
|
||||
for (int i = 0; i < ARRAYSIZE(defaultSymbols); i++)
|
||||
{
|
||||
wsprintf(temp, L"0x%08X (%S)", defaultSymbols[i].address, defaultSymbols[i].name);
|
||||
int index = ComboBox_AddString(comboxBox,temp);
|
||||
ComboBox_SetItemData(comboxBox,index,defaultSymbols[i].address);
|
||||
}
|
||||
|
||||
for (auto it = data.begin(), end = data.end(); it != end; ++it)
|
||||
{
|
||||
const DataEntry& entry = it->second;
|
||||
const char* name = GetLabelName(it->first);
|
||||
|
||||
if (name != NULL)
|
||||
wsprintf(temp, L"%S", name);
|
||||
else
|
||||
wsprintf(temp, L"0x%08X", it->first);
|
||||
|
||||
int index = ComboBox_AddString(comboxBox,temp);
|
||||
ComboBox_SetItemData(comboxBox,index,it->first);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
SendMessage(comboxBox, WM_SETREDRAW, TRUE, 0);
|
||||
RedrawWindow(comboxBox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user