eglfs: Round value returned from pixelDensity()
Avoid returning fractional scale factors, which we do not support. This matches the pixelDensity() implementation for the Xcb and Windows platform plugins. Change-Id: I79156e802a0a436b9344f12d35d1f4861e20e7fa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
This commit is contained in:
parent
8c89a8b1ef
commit
eef7725775
@ -224,7 +224,7 @@ QDpi QEGLDeviceIntegration::logicalDpi() const
|
|||||||
|
|
||||||
qreal QEGLDeviceIntegration::pixelDensity() const
|
qreal QEGLDeviceIntegration::pixelDensity() const
|
||||||
{
|
{
|
||||||
return logicalDpi().first / qreal(100);
|
return qRound(logicalDpi().first / qreal(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::ScreenOrientation QEGLDeviceIntegration::nativeOrientation() const
|
Qt::ScreenOrientation QEGLDeviceIntegration::nativeOrientation() const
|
||||||
|
Loading…
Reference in New Issue
Block a user