Changeset View
Changeset View
Standalone View
Standalone View
plugins/qpa/screen.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | 57 | | |||
58 | QPlatformCursor *Screen::cursor() const | 58 | QPlatformCursor *Screen::cursor() const | ||
59 | { | 59 | { | ||
60 | return m_cursor.data(); | 60 | return m_cursor.data(); | ||
61 | } | 61 | } | ||
62 | 62 | | |||
63 | QDpi Screen::logicalDpi() const | 63 | QDpi Screen::logicalDpi() const | ||
64 | { | 64 | { | ||
65 | static int force_dpi = qEnvironmentVariableIsSet("QT_WAYLAND_FORCE_DPI") ? qEnvironmentVariableIntValue("QT_WAYLAND_FORCE_DPI") : -1; | 65 | static int forceDpi = qEnvironmentVariableIsSet("QT_WAYLAND_FORCE_DPI") ? qEnvironmentVariableIntValue("QT_WAYLAND_FORCE_DPI") : -1; | ||
66 | if (force_dpi > 0) { | 66 | if (forceDpi > 0) { | ||
67 | return QDpi(force_dpi, force_dpi); | 67 | return QDpi(forceDpi, forceDpi); | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | return QPlatformScreen::logicalDpi(); | 70 | return QDpi(96, 96); | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | qreal Screen::devicePixelRatio() const | 73 | qreal Screen::devicePixelRatio() const | ||
74 | { | 74 | { | ||
75 | return m_screen != -1 ? screens()->scale(m_screen) : 1.0; | 75 | return m_screen != -1 ? screens()->scale(m_screen) : 1.0; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | } | 78 | } | ||
79 | } | 79 | } |