summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
diff options
context:
space:
mode:
authorCarlKenner <carl.kenner@gmail.com>2014-12-15 10:13:45 +1030
committerCarlKenner <carl.kenner@gmail.com>2014-12-17 01:11:41 +1030
commite246aaf419c34e23e6c37013e0b7ed7dbf11ba21 (patch)
treea6af94c000197e4c7f5b41e480fcfca10bebd955 /Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
parentf54d9e33c256560e0c06041cc2c480d6ada32c6e (diff)
Add "Load bad map file" option for map files on disc that don't quite match.
Currently it is very simple and naive, but filters out most of the bad matches.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
index cba74774da..b19d26fb74 100644
--- a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
@@ -155,8 +155,11 @@ void CCodeWindow::CreateMenuSymbols(wxMenuBar *pMenuBar)
_("Try to load this game's function names automatically - but doesn't check .map files stored on the disc image yet."));
pSymbolsMenu->Append(IDM_SAVEMAPFILE, _("&Save symbol map"),
_("Save the function names for each address to a .map file in your user settings map folder, named after the title id."));
+ pSymbolsMenu->AppendSeparator();
pSymbolsMenu->Append(IDM_LOADMAPFILEAS, _("Choose symbol map file to load..."),
_("Load any .map file containing the function names and addresses for this game."));
+ pSymbolsMenu->Append(IDM_LOADBADMAPFILE, _("Load &bad map file..."),
+ _("Try to load a .map file that might be from a slightly different version."));
pSymbolsMenu->Append(IDM_SAVEMAPFILEAS, _("Save symbol map &as..."),
_("Save the function names and addresses for this game as a .map file. If you want to open it in IDA pro, use the .idc script."));
pSymbolsMenu->AppendSeparator();
@@ -301,6 +304,23 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
NotifyMapLoaded();
}
break;
+ case IDM_LOADBADMAPFILE:
+ {
+ const wxString path = wxFileSelector(
+ _("Load bad map file"), File::GetUserPath(D_MAPS_IDX),
+ title_id_str + ".map", ".map",
+ "Dolphin Map File (*.map)|*.map|All files (*.*)|*.*",
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
+
+ if (!path.IsEmpty())
+ {
+ g_symbolDB.LoadBadMap(WxStrToStr(path));
+ Parent->StatusBarMessage("Loaded symbols from '%s'", path.c_str());
+ }
+ HLE::PatchFunctions();
+ NotifyMapLoaded();
+ }
+ break;
case IDM_SAVEMAPFILE:
g_symbolDB.SaveMap(writable_map_file);
break;