From 562fea5564f36cb73226b9eb7ef6f60b7da7e3af Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 18 Jul 2026 13:13:03 +0200 Subject: [PATCH] Add DPI change notification method in View. --- profiler/src/main.cpp | 3 +++ profiler/src/profiler/TracyView.cpp | 4 ++++ profiler/src/profiler/TracyView.hpp | 1 + 3 files changed, 8 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index d55bb8ac..34f284fe 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -198,6 +198,9 @@ static void SetupDPIScale() prevScale = scale; auto ctx = ImGui::GetCurrentContext(); for( auto& w : ctx->Windows ) ScaleWindow( w, ratio ); + + auto viewPtr = view.load( std::memory_order_acquire ); + if( viewPtr ) viewPtr->DpiScaleChanged(); } static int IsBusy() diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index 7b755c5c..a916af79 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -1526,6 +1526,10 @@ bool View::WasActive() const !m_worker.IsBackgroundDone(); } +void View::DpiScaleChanged() +{ +} + void View::AddLlmAttachment( const nlohmann::json& json ) { #ifndef __EMSCRIPTEN__ diff --git a/profiler/src/profiler/TracyView.hpp b/profiler/src/profiler/TracyView.hpp index e976c2f1..e95aa95c 100644 --- a/profiler/src/profiler/TracyView.hpp +++ b/profiler/src/profiler/TracyView.hpp @@ -151,6 +151,7 @@ public: bool Draw(); bool WasActive() const; + void DpiScaleChanged(); void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void ViewSource( const char* fileName, int line );