diff --git a/Core/Debugger/SymbolMap.cpp b/Core/Debugger/SymbolMap.cpp index 3f87e0762b..82204d205b 100644 --- a/Core/Debugger/SymbolMap.cpp +++ b/Core/Debugger/SymbolMap.cpp @@ -728,7 +728,7 @@ void SymbolMap::AddLabel(const char* name, u32 address, int moduleIndex) { } } -void SymbolMap::SetLabelName(const char* name, u32 address) { +void SymbolMap::SetLabelName(const char* name, u32 address, bool updateImmediately) { lock_guard guard(lock_); auto labelInfo = activeLabels.find(address); if (labelInfo == activeLabels.end()) { @@ -740,9 +740,11 @@ void SymbolMap::SetLabelName(const char* name, u32 address) { strcpy(label->second.name,name); label->second.name[127] = 0; - // Do we really need to call this here? Causes extreme startup slowdown - // as this gets called for every function identified by the function replacement code. - // UpdateActiveSymbols(); + // Allow the caller to skip this as it causes extreme startup slowdown + // when this gets called for every function identified by the function replacement code. + if (updateImmediately) { + UpdateActiveSymbols(); + } } } } diff --git a/Core/Debugger/SymbolMap.h b/Core/Debugger/SymbolMap.h index c4cdaca020..53e6082f7f 100644 --- a/Core/Debugger/SymbolMap.h +++ b/Core/Debugger/SymbolMap.h @@ -98,7 +98,7 @@ public: void AddLabel(const char* name, u32 address, int moduleIndex = -1); std::string GetLabelString(u32 address) const; - void SetLabelName(const char* name, u32 address); + void SetLabelName(const char* name, u32 address, bool updateImmediately = true); bool GetLabelValue(const char* name, u32& dest); void AddData(u32 address, u32 size, DataType type, int moduleIndex = -1); diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index c4aa46691d..f9a5877eae 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -641,7 +641,7 @@ skip: char defaultLabel[256]; // If it was renamed, keep it. Only change the name if it's still the default. if (existingLabel.empty() || !strcmp(existingLabel.c_str(), DefaultFunctionName(defaultLabel, f.start))) { - symbolMap.SetLabelName(mf->name, f.start); + symbolMap.SetLabelName(mf->name, f.start, false); } } } diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index 8df85d968a..985ed2fb65 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -115,7 +115,7 @@ unsigned int WINAPI TheThread(void *) } NativeInitGraphics(); - NativeResized(); + NativeResized(); INFO_LOG(BOOT, "Done."); _dbg_update_();