From eef772577594b59d9cee5d55da5c47cd81008735 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?=
 <morten.sorvig@theqtcompany.com>
Date: Tue, 12 Jan 2016 13:02:05 +0100
Subject: [PATCH] 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>
---
 src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp
index 8af48a893b1..1fb6020d69b 100644
--- a/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp
@@ -224,7 +224,7 @@ QDpi QEGLDeviceIntegration::logicalDpi() const
 
 qreal QEGLDeviceIntegration::pixelDensity() const
 {
-    return logicalDpi().first / qreal(100);
+    return qRound(logicalDpi().first / qreal(100));
 }
 
 Qt::ScreenOrientation QEGLDeviceIntegration::nativeOrientation() const
-- 
GitLab