1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-28 02:30:05 +00:00

OpenGLContext: Fix scaling mismatch between opengl peer and desktop

This commit is contained in:
reuk 2026-01-07 20:08:04 +00:00
parent 815603e61c
commit a819cd14a6
No known key found for this signature in database

View file

@ -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