SignatureDB: MEGA FormatHandler added

This commit is contained in:
Sepalani
2017-03-31 13:00:19 +01:00
parent 82afda94f4
commit 5f81226d8d
8 changed files with 41 additions and 27 deletions

View File

@ -166,7 +166,8 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
{
static const wxString signature_selector = _("Dolphin Signature File (*.dsy)") + "|*.dsy|" +
_("Dolphin Signature CSV File (*.csv)") + "|*.csv|" +
wxGetTranslation(wxALL_FILES);
_("WiiTools Signature MEGA File (*.mega)") +
"|*.mega|" + wxGetTranslation(wxALL_FILES);
Parent->ClearStatusBar();
if (!Core::IsRunning())
@ -429,22 +430,6 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
}
}
break;
case IDM_USE_MEGA_SIGNATURE_FILE:
{
wxString path = wxFileSelector(
_("Apply MEGA signature file"), File::GetSysDirectory(), wxEmptyString, wxEmptyString,
_("MEGA Signature File (*.mega)") + "|*.mega|" + wxGetTranslation(wxALL_FILES),
wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
if (!path.IsEmpty())
{
MEGASignatureDB db;
db.Load(WxStrToStr(path));
db.Apply(&g_symbolDB);
db.List();
NotifyMapLoaded();
}
}
break;
case IDM_PATCH_HLE_FUNCTIONS:
HLE::PatchFunctions();
Repopulate();

View File

@ -246,7 +246,6 @@ void CFrame::BindDebuggerMenuBarUpdateEvents()
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_COMBINE_SIGNATURE_FILES);
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_RENAME_SYMBOLS);
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_USE_SIGNATURE_FILE);
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_USE_MEGA_SIGNATURE_FILE);
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_PATCH_HLE_FUNCTIONS);
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreUninitialized, IDM_JIT_NO_BLOCK_CACHE);

View File

@ -232,7 +232,6 @@ enum
IDM_COMBINE_SIGNATURE_FILES,
IDM_RENAME_SYMBOLS,
IDM_USE_SIGNATURE_FILE,
IDM_USE_MEGA_SIGNATURE_FILE,
IDM_PATCH_HLE_FUNCTIONS,
// JIT

View File

@ -471,11 +471,7 @@ wxMenu* MainMenuBar::CreateSymbolsMenu() const
symbols_menu->Append(
IDM_USE_SIGNATURE_FILE, _("Apply Signat&ure File..."),
_("Must use Generate Symbols first! Recognise names of any standard library functions "
"used in multiple games, by loading them from a .dsy file."));
symbols_menu->Append(
IDM_USE_MEGA_SIGNATURE_FILE, _("Apply &MEGA Signature File..."),
_("Must use Generate Symbols first! Recognise names of any standard library functions "
"used in multiple games, by loading them from a .mega file."));
"used in multiple games, by loading them from a .dsy, .csv, or .mega file."));
symbols_menu->AppendSeparator();
symbols_menu->Append(IDM_PATCH_HLE_FUNCTIONS, _("&Patch HLE Functions"));
symbols_menu->Append(IDM_RENAME_SYMBOLS, _("&Rename Symbols from File..."));