mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Overlay the user Maps/ over the shared one to avoid copying files
This commit is contained in:
@ -211,7 +211,9 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||
|
||||
if (Core::GetState() == Core::CORE_UNINITIALIZED) return;
|
||||
|
||||
std::string mapfile = CBoot::GenerateMapFilename();
|
||||
std::string existing_map_file, writable_map_file;
|
||||
bool map_exists = CBoot::FindMapFile(&existing_map_file,
|
||||
&writable_map_file);
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_CLEARSYMBOLS:
|
||||
@ -238,28 +240,28 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||
break;
|
||||
}
|
||||
case IDM_LOADMAPFILE:
|
||||
if (!File::Exists(mapfile))
|
||||
if (!map_exists)
|
||||
{
|
||||
g_symbolDB.Clear();
|
||||
PPCAnalyst::FindFunctions(0x81300000, 0x81800000, &g_symbolDB);
|
||||
SignatureDB db;
|
||||
if (db.Load((File::GetSysDirectory() + TOTALDB).c_str()))
|
||||
db.Apply(&g_symbolDB);
|
||||
Parent->StatusBarMessage("'%s' not found, scanning for common functions instead", mapfile.c_str());
|
||||
Parent->StatusBarMessage("'%s' not found, scanning for common functions instead", writable_map_file.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
g_symbolDB.LoadMap(mapfile.c_str());
|
||||
Parent->StatusBarMessage("Loaded symbols from '%s'", mapfile.c_str());
|
||||
g_symbolDB.LoadMap(existing_map_file.c_str());
|
||||
Parent->StatusBarMessage("Loaded symbols from '%s'", existing_map_file.c_str());
|
||||
}
|
||||
HLE::PatchFunctions();
|
||||
NotifyMapLoaded();
|
||||
break;
|
||||
case IDM_SAVEMAPFILE:
|
||||
g_symbolDB.SaveMap(mapfile.c_str());
|
||||
g_symbolDB.SaveMap(writable_map_file.c_str());
|
||||
break;
|
||||
case IDM_SAVEMAPFILEWITHCODES:
|
||||
g_symbolDB.SaveMap(mapfile.c_str(), true);
|
||||
g_symbolDB.SaveMap(writable_map_file.c_str(), true);
|
||||
break;
|
||||
|
||||
case IDM_RENAME_SYMBOLS:
|
||||
|
@ -253,8 +253,6 @@ bool DolphinApp::OnInit()
|
||||
//TODO : detect the revision and upgrade where necessary
|
||||
File::CopyDir(std::string(SHARED_USER_DIR GAMECONFIG_DIR DIR_SEP),
|
||||
File::GetUserPath(D_GAMECONFIG_IDX));
|
||||
File::CopyDir(std::string(SHARED_USER_DIR MAPS_DIR DIR_SEP),
|
||||
File::GetUserPath(D_MAPS_IDX));
|
||||
File::CopyDir(std::string(SHARED_USER_DIR SHADERS_DIR DIR_SEP),
|
||||
File::GetUserPath(D_SHADERS_IDX));
|
||||
File::CopyDir(std::string(SHARED_USER_DIR WII_USER_DIR DIR_SEP),
|
||||
@ -272,6 +270,7 @@ bool DolphinApp::OnInit()
|
||||
File::CreateFullPath(File::GetUserPath(D_SCREENSHOTS_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_STATESAVES_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_MAILLOGS_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_MAPS_IDX));
|
||||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + USA_DIR DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + EUR_DIR DIR_SEP);
|
||||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + JAP_DIR DIR_SEP);
|
||||
|
Reference in New Issue
Block a user