diff --git a/modules/juce_gui_basics/components/juce_Desktop.cpp b/modules/juce_gui_basics/components/juce_Desktop.cpp index 81224c9eef..9317213fe2 100644 --- a/modules/juce_gui_basics/components/juce_Desktop.cpp +++ b/modules/juce_gui_basics/components/juce_Desktop.cpp @@ -401,6 +401,11 @@ void Desktop::setOrientationsEnabled (const int newOrientations) } } +int Desktop::getOrientationsEnabled() const noexcept +{ + return allowedOrientations; +} + bool Desktop::isOrientationEnabled (const DisplayOrientation orientation) const noexcept { // Make sure you only pass one valid flag in here... diff --git a/modules/juce_gui_basics/components/juce_Desktop.h b/modules/juce_gui_basics/components/juce_Desktop.h index f265d1460d..3677263296 100644 --- a/modules/juce_gui_basics/components/juce_Desktop.h +++ b/modules/juce_gui_basics/components/juce_Desktop.h @@ -312,6 +312,11 @@ public: */ void setOrientationsEnabled (int allowedOrientations); + /** Returns the set of orientations the display is allowed to rotate to. + @see setOrientationsEnabled + */ + int getOrientationsEnabled() const noexcept; + /** Returns whether the display is allowed to auto-rotate to the given orientation. Each orientation can be enabled using setOrientationEnabled(). By default, all orientations are allowed. */