From bce6c0911e4f2c63f71856fcf5651f4e52c066b9 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 14 Feb 2021 00:12:47 +0100 Subject: [PATCH] Don't call obsolete method ID2D1Factory::GetDesktopDpi() is reported as deprecated. --- src/msw/graphicsd2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index a0e460c70b..c6f2dcf02d 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -3711,7 +3711,7 @@ private: wxCHECK_HRESULT_RET(hr); FLOAT dpiX, dpiY; - m_factory->GetDesktopDpi(&dpiX, &dpiY); + dpiX = dpiY = (FLOAT)::GetDpiForWindow(m_hwnd); // Now we set up the Direct2D render target bitmap linked to the swapchain. // Whenever we render to this bitmap, it is directly rendered to the