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:
Morten Johan Sørvig 2016-01-12 13:02:05 +01:00
parent 8c89a8b1ef
commit eef7725775

View File

@ -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