From bbc1d432908c2e288c814a75ec93b7e8f6e5da33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 24 Aug 2018 00:46:06 +0200 Subject: [PATCH] Fixed QT4 build --- src/map/image.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/map/image.cpp b/src/map/image.cpp index 0365422f..b2f05214 100644 --- a/src/map/image.cpp +++ b/src/map/image.cpp @@ -9,7 +9,11 @@ Image::Image(const QString &fileName) : _img(fileName) void Image::draw(QPainter *painter, const QRectF &rect, Map::Flags flags) { +#ifdef ENABLE_HIDPI qreal ratio = _img.devicePixelRatioF(); +#else // ENABLE_HIDPI + qreal ratio = 1.0; +#endif // ENABLE_HIDPI QRectF sr(rect.topLeft() * ratio, rect.size() * ratio); if (flags & Map::OpenGL) {