From 7b61bdfba9b37bdfb93929eb3e592662f077de91 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 29 Sep 2022 12:30:42 +0100 Subject: [PATCH] AudioPluginHost: Fix implicit conversion warnings --- extras/AudioPluginHost/Source/UI/PluginWindow.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/extras/AudioPluginHost/Source/UI/PluginWindow.h b/extras/AudioPluginHost/Source/UI/PluginWindow.h index c84518ac8c..80280639b1 100644 --- a/extras/AudioPluginHost/Source/UI/PluginWindow.h +++ b/extras/AudioPluginHost/Source/UI/PluginWindow.h @@ -176,11 +176,15 @@ 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()); + const auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true).toFloat(); + const auto scaleFactor = jmin ((screenBounds.getWidth() - 50.0f) / (float) getWidth(), + (screenBounds.getHeight() - 50.0f) / (float) getHeight()); if (scaleFactor < 1.0f) - setSize ((int) (getWidth() * scaleFactor), (int) (getHeight() * scaleFactor)); + { + setSize ((int) (scaleFactor * (float) getWidth()), + (int) (scaleFactor * (float) getHeight())); + } setTopLeftPosition (20, 20); #else