From 2a75968ff46292f5eec4e17476338debcbb169b0 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 25 Jan 2023 21:16:05 -0500 Subject: main: Convert to device independent coordinates for scaling devicePixelRatioF() returns the scaling ratio when high dpi scaling is enabled. When high dpi scaling is enabled, the raw screen coordinate system is scaled to device independent coordinates. --- src/yuzu/applets/qt_software_keyboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/applets') diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp index 734b0ea40c..4ae49506d8 100644 --- a/src/yuzu/applets/qt_software_keyboard.cpp +++ b/src/yuzu/applets/qt_software_keyboard.cpp @@ -575,7 +575,7 @@ void QtSoftwareKeyboardDialog::MoveAndResizeWindow(QPoint pos, QSize size) { QDialog::resize(size); // High DPI - const float dpi_scale = qApp->screenAt(pos)->logicalDotsPerInch() / 96.0f; + const float dpi_scale = screen()->logicalDotsPerInch() / 96.0f; RescaleKeyboardElements(size.width(), size.height(), dpi_scale); } -- cgit v1.2.3