diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-01-25 21:16:05 -0500 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-01-25 21:16:05 -0500 |
commit | ad6cec71ecd61aa2533d9efa89b68837516f8464 (patch) | |
tree | f5f2831ee518cf2bbaf6010ed3e6306a69755e92 /src/yuzu/applets/qt_software_keyboard.cpp | |
parent | 5be85c556ed05cd9d751fb7b3f8a331800ee573d (diff) |
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.
Diffstat (limited to 'src/yuzu/applets/qt_software_keyboard.cpp')
-rw-r--r-- | src/yuzu/applets/qt_software_keyboard.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp index 734b0ea40..4ae49506d 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); } |