mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-19 19:00:09 +02:00
allow dumping of all symbols to a signature file
*hopefully* fix the memleak when scrubbing wii discs. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4588 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -334,34 +334,42 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||
|
||||
case IDM_CREATESIGNATUREFILE:
|
||||
{
|
||||
wxTextEntryDialog input_prefix(this, wxString::FromAscii("Only export symbols with prefix:"), wxGetTextFromUserPromptStr, _T("."));
|
||||
if (input_prefix.ShowModal() == wxID_OK) {
|
||||
std::string prefix(input_prefix.GetValue().mb_str());
|
||||
wxTextEntryDialog input_prefix(
|
||||
this,
|
||||
wxString::FromAscii("Only export symbols with prefix:\n(Blank for all symbols)"),
|
||||
wxGetTextFromUserPromptStr,
|
||||
wxEmptyString);
|
||||
|
||||
wxString path = wxFileSelector(
|
||||
if (input_prefix.ShowModal() == wxID_OK)
|
||||
{
|
||||
std::string prefix(input_prefix.GetValue().mb_str());
|
||||
|
||||
wxString path = wxFileSelector(
|
||||
_T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString,
|
||||
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE,
|
||||
this);
|
||||
if (! path.IsEmpty()) {
|
||||
SignatureDB db;
|
||||
db.Initialize(&g_symbolDB, prefix.c_str());
|
||||
std::string filename(path.mb_str()); // PPCAnalyst::SaveSignatureDB(
|
||||
db.Save(path.mb_str());
|
||||
if (!path.IsEmpty())
|
||||
{
|
||||
SignatureDB db;
|
||||
db.Initialize(&g_symbolDB, prefix.c_str());
|
||||
std::string filename(path.mb_str());
|
||||
db.Save(path.mb_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IDM_USESIGNATUREFILE:
|
||||
{
|
||||
wxString path = wxFileSelector(
|
||||
wxString path = wxFileSelector(
|
||||
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
|
||||
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
|
||||
this);
|
||||
if (! path.IsEmpty()) {
|
||||
SignatureDB db;
|
||||
db.Load(path.mb_str());
|
||||
db.Apply(&g_symbolDB);
|
||||
}
|
||||
if (!path.IsEmpty())
|
||||
{
|
||||
SignatureDB db;
|
||||
db.Load(path.mb_str());
|
||||
db.Apply(&g_symbolDB);
|
||||
}
|
||||
}
|
||||
NotifyMapLoaded();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user