summaryrefslogtreecommitdiff
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
commitad6cec71ecd61aa2533d9efa89b68837516f8464 (patch)
treef5f2831ee518cf2bbaf6010ed3e6306a69755e92 /src/yuzu/util
parent5be85c556ed05cd9d751fb7b3f8a331800ee573d (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 796f5bf41..ee35a3e15 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 =