mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-20 04:17:54 -05:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user