iOS: Only use [UIDevice orientation] for the main/device screen

Auxiliary screens are always in their primaryOrientation.

Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
bb10
Tor Arne Vestbø 2015-01-16 18:26:16 +01:00 committed by Tor Arne Vestbø
parent bd26defd9b
commit cc0a114cd6
1 changed files with 4 additions and 0 deletions

View File

@ -318,6 +318,10 @@ Qt::ScreenOrientation QIOSScreen::nativeOrientation() const
Qt::ScreenOrientation QIOSScreen::orientation() const
{
// Auxiliary screens are always the same orientation as their primary orientation
if (m_uiScreen != [UIScreen mainScreen])
return Qt::PrimaryOrientation;
UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
// At startup, iOS will report an unknown orientation for the device, even