From ca9a50ea821f336ebff3914136909dbb3efe557c Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 20 Dec 2018 12:31:44 +0000 Subject: [PATCH] VST2: Fix scaling bug in hosts which don't support the sizeWindow call --- modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index cb852e8f6f..e2f32b7e0b 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1462,6 +1462,11 @@ public: int dh = 0; const int frameThickness = GetSystemMetrics (SM_CYFIXEDFRAME); + #if JUCE_WIN_PER_MONITOR_DPI_AWARE + newWidth = roundToInt (newWidth * wrapper.editorScaleFactor); + newHeight = roundToInt (newHeight * wrapper.editorScaleFactor); + #endif + HWND w = (HWND) getWindowHandle(); while (w != 0)