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
parent
bd26defd9b
commit
cc0a114cd6
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue