From 5fc20f71068f975d5dd62d35d7d1b0f53e35dafd Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 10 Feb 2021 15:26:27 +0000 Subject: [PATCH] VST: Made the check for Windows high-DPI screen change resizing more strict to prevent UI glitches when resizing manually --- modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp | 2 +- modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 6c97aa2441..290837a0c7 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1141,7 +1141,7 @@ public: auto newBounds = getLocalBounds(); #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.1)) + if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.001)) return; lastBounds = newBounds; diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index e0a6443702..52d8c7d3b1 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1576,7 +1576,7 @@ private: auto newBounds = getLocalBounds(); #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.1)) + if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.001)) return; #endif