From 7f659137622d01326924ec06e50feaf0411fce9e Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:26:42 +1000 Subject: [PATCH] Use more portable encoding for Unicode character in debug strfs --- source/client/StarClientApplication.cpp | 10 +++++----- source/game/StarWorldClient.cpp | 2 +- source/rendering/StarWorldPainter.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index ebaa211..86dc0c2 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -389,23 +389,23 @@ void ClientApplication::render() { auto start = Time::monotonicMicroseconds(); renderer->switchEffectConfig("world"); worldClient->render(m_renderData, TilePainter::BorderTileSize); - LogMap::set("render_world_client", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_world_client", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); start = Time::monotonicMicroseconds(); m_worldPainter->render(m_renderData, [&]() { worldClient->waitForLighting(); }); - LogMap::set("render_world_painter", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_world_painter", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); start = Time::monotonicMicroseconds(); m_mainInterface->renderInWorldElements(); - LogMap::set("render_world_elements", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_world_elements", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); renderer->switchEffectConfig("default"); - LogMap::set("render_world_total", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_world_total", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); } auto start = Time::monotonicMicroseconds(); m_mainInterface->render(); m_cinematicOverlay->render(); - LogMap::set("render_interface", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_interface", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); } if (!m_errorScreen->accepted()) diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp index d1c9390..accf025 100644 --- a/source/game/StarWorldClient.cpp +++ b/source/game/StarWorldClient.cpp @@ -1458,7 +1458,7 @@ void WorldClient::lightingMain() { m_lightingCalculator.calculate(m_renderData->lightMap); m_renderData = nullptr; - LogMap::set("render_world_async_lighting_calc_time", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_world_async_lighting_calc_time", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); } m_lightingCond.wait(m_lightingMutex); diff --git a/source/rendering/StarWorldPainter.cpp b/source/rendering/StarWorldPainter.cpp index 30ecfb7..9a93365 100644 --- a/source/rendering/StarWorldPainter.cpp +++ b/source/rendering/StarWorldPainter.cpp @@ -72,7 +72,7 @@ void WorldPainter::render(WorldRenderData& renderData, function lightWai if (lightWaiter) { auto start = Time::monotonicMicroseconds(); lightWaiter(); - LogMap::set("render_world_async_lighting_wait_time", strf(u8"{:05d}µs", Time::monotonicMicroseconds() - start)); + LogMap::set("render_world_async_lighting_wait_time", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); } if (renderData.isFullbright) {