From b22db01968c249b37f8de7d34a13e4ade12d514b Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 7 Jun 2019 09:22:10 +0100 Subject: [PATCH] Fixed an iOS compiler warning --- extras/AudioPluginHost/Source/UI/PluginWindow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/AudioPluginHost/Source/UI/PluginWindow.h b/extras/AudioPluginHost/Source/UI/PluginWindow.h index 9550127d3f..e092e1c89b 100644 --- a/extras/AudioPluginHost/Source/UI/PluginWindow.h +++ b/extras/AudioPluginHost/Source/UI/PluginWindow.h @@ -154,10 +154,10 @@ public: #if JUCE_IOS || JUCE_ANDROID auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true).toFloat(); - auto scaleFactor = jmin ((screenBounds.getWidth() - 50) / getWidth(), (screenBounds.getHeight() - 50) / getHeight()); + if (scaleFactor < 1.0f) - setSize (getWidth() * scaleFactor, getHeight() * scaleFactor); + setSize ((int) (getWidth() * scaleFactor), (int) (getHeight() * scaleFactor)); setTopLeftPosition (20, 20); #else