impr: Properly allow multi-threaded logging without messing up output
This commit is contained in:
parent
ef1d831158
commit
7de367a944
@ -36,6 +36,9 @@ namespace hex::log {
|
||||
[[maybe_unused]] void print(const fmt::text_style &ts, const std::string &level, const std::string &fmt, auto... args) {
|
||||
auto dest = getDestination();
|
||||
|
||||
static std::mutex loggerMutex;
|
||||
std::scoped_lock lock(loggerMutex);
|
||||
|
||||
printPrefix(dest, ts, level);
|
||||
fmt::print(dest, fmt::runtime(fmt), args...);
|
||||
fmt::print(dest, "\n");
|
||||
|
@ -540,7 +540,7 @@ namespace hex::plugin::builtin {
|
||||
auto &runtime = ContentRegistry::PatternLanguage::getRuntime();
|
||||
auto &evaluator = runtime.getInternals().evaluator;
|
||||
|
||||
if (ImGui::BeginChild("##debugger", size, true, ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
|
||||
if (ImGui::BeginChild("##debugger", size, true)) {
|
||||
const auto &breakpoints = evaluator->getBreakpoints();
|
||||
auto line = this->m_textEditor.GetCursorPosition().mLine + 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user