1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

AudioPluginHost: Fix implicit conversion warnings

This commit is contained in:
reuk 2022-09-29 12:30:42 +01:00
parent dc8bc918d2
commit 7b61bdfba9
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -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