aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/util
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-01-25 21:16:05 -0500
committerMorph <39850852+Morph1984@users.noreply.github.com>2023-01-25 21:16:05 -0500
commit2a75968ff46292f5eec4e17476338debcbb169b0 (patch)
treef5f2831ee518cf2bbaf6010ed3e6306a69755e92 /src/yuzu/util
parent3c27ddd604ee92bb95927c4e1cc88eb6242edbdd (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/util')
-rw-r--r--src/yuzu/util/overlay_dialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp
index 796f5bf41e..ee35a3e151 100644
--- a/src/yuzu/util/overlay_dialog.cpp
+++ b/src/yuzu/util/overlay_dialog.cpp
@@ -163,7 +163,7 @@ void OverlayDialog::MoveAndResizeWindow() {
const auto height = static_cast<float>(parentWidget()->height());
// High DPI
- const float dpi_scale = parentWidget()->windowHandle()->screen()->logicalDotsPerInch() / 96.0f;
+ const float dpi_scale = screen()->logicalDotsPerInch() / 96.0f;
const auto title_text_font_size = BASE_TITLE_FONT_SIZE * (height / BASE_HEIGHT) / dpi_scale;
const auto body_text_font_size =