iOS: Implement QIOSScreen::refreshRate to account for 120Hz displays
Task-number: QTBUG-64968 Change-Id: If96f6cde8f2fc6d91beb842d82a881fe057260b5 Reviewed-by: Jake Petroules <jake.petroules@qt.io>bb10
parent
d2d6c6f781
commit
3d720f38fa
|
|
@ -69,6 +69,7 @@ public:
|
|||
QSizeF physicalSize() const Q_DECL_OVERRIDE;
|
||||
QDpi logicalDpi() const Q_DECL_OVERRIDE;
|
||||
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
|
||||
qreal refreshRate() const override;
|
||||
|
||||
Qt::ScreenOrientation nativeOrientation() const Q_DECL_OVERRIDE;
|
||||
Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
|
|
@ -459,6 +459,16 @@ qreal QIOSScreen::devicePixelRatio() const
|
|||
return [m_uiScreen scale];
|
||||
}
|
||||
|
||||
qreal QIOSScreen::refreshRate() const
|
||||
{
|
||||
#if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_NA, 100300, 110000, __WATCHOS_NA)
|
||||
if (__builtin_available(iOS 10.3, tvOS 11, *))
|
||||
return m_uiScreen.maximumFramesPerSecond;
|
||||
#endif
|
||||
|
||||
return 60.0;
|
||||
}
|
||||
|
||||
Qt::ScreenOrientation QIOSScreen::nativeOrientation() const
|
||||
{
|
||||
CGRect nativeBounds =
|
||||
|
|
|
|||
Loading…
Reference in New Issue