1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OpenGL: Take global scale factor into account when setting rendering scale on Windows

This commit is contained in:
ed 2020-05-29 16:29:39 +01:00
parent 40ab91dea4
commit 05602341fc

View file

@ -285,6 +285,10 @@ public:
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
auto newScale = getScaleFactorForWindow (nativeContext->getNativeHandle());
auto desktopScale = Desktop::getInstance().getGlobalScaleFactor();
if (! approximatelyEqual (1.0f, desktopScale))
newScale *= desktopScale;
#else
auto newScale = displayScale;
#endif