mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
PPCSymbolDB: Move loading map on boot logic from boot.cpp into PPCSymbolDB, as it will be needing a mutex.
Cleanup loading code and reduce amount of signals. On boot. allow previously loaded map to be kept, if its filename matches. Useful for restarting a game with a large symbol map.
This commit is contained in:
@ -44,15 +44,20 @@ void SymbolDB::List()
|
||||
|
||||
bool SymbolDB::IsEmpty() const
|
||||
{
|
||||
return m_functions.empty();
|
||||
return m_functions.empty() && m_notes.empty();
|
||||
}
|
||||
|
||||
void SymbolDB::Clear(const char* prefix)
|
||||
bool SymbolDB::Clear(const char* prefix)
|
||||
{
|
||||
// TODO: honor prefix
|
||||
m_map_name.clear();
|
||||
if (IsEmpty())
|
||||
return false;
|
||||
|
||||
m_functions.clear();
|
||||
m_notes.clear();
|
||||
m_checksum_to_function.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
void SymbolDB::Index()
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
const XNoteMap& Notes() const { return m_notes; }
|
||||
XFuncMap& AccessSymbols() { return m_functions; }
|
||||
bool IsEmpty() const;
|
||||
void Clear(const char* prefix = "");
|
||||
bool Clear(const char* prefix = "");
|
||||
void List();
|
||||
void Index();
|
||||
|
||||
@ -108,5 +108,6 @@ protected:
|
||||
XFuncMap m_functions;
|
||||
XNoteMap m_notes;
|
||||
XFuncPtrMap m_checksum_to_function;
|
||||
std::string m_map_name;
|
||||
};
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user