From a819cd14a6577cc98f739dbef35729bfd63aed6a Mon Sep 17 00:00:00 2001 From: reuk Date: Wed, 7 Jan 2026 20:08:04 +0000 Subject: [PATCH] OpenGLContext: Fix scaling mismatch between opengl peer and desktop --- modules/juce_opengl/opengl/juce_OpenGLContext.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index 3cf314ea16..a2532fb0d7 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -468,9 +468,7 @@ public: const auto newArea = globalArea.withZeroOrigin() * displayScale; #else - const auto newArea = desktop.getDisplays() - .logicalToPhysical (globalArea) - .withZeroOrigin(); + const auto newArea = (globalArea.toFloat() * peer->getPlatformScaleFactor()).withZeroOrigin().toNearestInt(); #endif // On Windows some hosts (Pro Tools 2022.7) do not take the current DPI into account