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 78cd39216b..1cee5c001c 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1019,7 +1019,7 @@ public: // before that happens. X11Symbols::getInstance()->xFlush (display); #elif JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - checkHostWindowScaleFactor(); + checkHostWindowScaleFactor (true); startTimer (500); #endif #elif JUCE_MAC @@ -1223,12 +1223,12 @@ public: } #if JUCE_WIN_PER_MONITOR_DPI_AWARE - void checkHostWindowScaleFactor() + void checkHostWindowScaleFactor (bool force = false) { auto hostWindowScale = (float) getScaleFactorForWindow ((HostWindowType) hostWindow); - if (hostWindowScale > 0.0f && ! approximatelyEqual (hostWindowScale, wrapper.editorScaleFactor)) - wrapper.handleSetContentScaleFactor (hostWindowScale); + if (force || (hostWindowScale > 0.0f && ! approximatelyEqual (hostWindowScale, wrapper.editorScaleFactor))) + wrapper.handleSetContentScaleFactor (hostWindowScale, force); } void timerCallback() override @@ -2013,7 +2013,7 @@ private: return 0; } - pointer_sized_int handleSetContentScaleFactor (float scale) + pointer_sized_int handleSetContentScaleFactor (float scale, bool force = false) { checkWhetherMessageThreadIsCorrect(); #if JUCE_LINUX || JUCE_BSD @@ -2023,7 +2023,7 @@ private: #endif #if ! JUCE_MAC - if (! approximatelyEqual (scale, editorScaleFactor)) + if (force || ! approximatelyEqual (scale, editorScaleFactor)) { editorScaleFactor = scale; @@ -2032,7 +2032,7 @@ private: } #else - ignoreUnused (scale); + ignoreUnused (scale, force); #endif return 1;