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

Added Android support for screen orientation control

This commit is contained in:
jules 2016-01-13 12:05:29 +00:00
parent 668d9c5f69
commit 99052af8bc
9 changed files with 62 additions and 15 deletions

View file

@ -386,10 +386,14 @@ void Desktop::setKioskModeComponent (Component* componentToUse, const bool allow
//==============================================================================
void Desktop::setOrientationsEnabled (const int newOrientations)
{
// Dodgy set of flags being passed here! Make sure you specify at least one permitted orientation.
jassert (newOrientations != 0 && (newOrientations & ~allOrientations) == 0);
if (allowedOrientations != newOrientations)
{
// Dodgy set of flags being passed here! Make sure you specify at least one permitted orientation.
jassert (newOrientations != 0 && (newOrientations & ~allOrientations) == 0);
allowedOrientations = newOrientations;
allowedOrientations = newOrientations;
allowedOrientationsChanged();
}
}
bool Desktop::isOrientationEnabled (const DisplayOrientation orientation) const noexcept